Cloud-Native Architecture Patterns (Or… why your pre-cloud architecture won’t work so well in the cloud) Azure Florida Association 28-March-2012 Boston.

Slides:



Advertisements
Similar presentations
Architecting to be Cloud Native On Windows Azure or Otherwise
Advertisements

What’s New in Windows Azure A platform overview + how it can fit into my development shop today… New England Microsoft Dev Group 06-June-2013 (6:30-8:30.
Microsoft Azure Cloud Platform an overview
Amazon RDS (MySQL and Oracle) and SQL Azure Emil Tabakov Telerik Software Academy academy.telerik.com.
 Need for a new processing platform (BigData)  Origin of Hadoop  What is Hadoop & what it is not ?  Hadoop architecture  Hadoop components (Common/HDFS/MapReduce)
Lecture 6 – Google File System (GFS) CSE 490h – Introduction to Distributed Computing, Winter 2008 Except as otherwise noted, the content of this presentation.
The Google File System. Why? Google has lots of data –Cannot fit in traditional file system –Spans hundreds (thousands) of servers connected to (tens.
Overview Of Microsoft New Technology ENTER. Processing....
Big Ideas in Software Architecture (in cloud or otherwise) 14-December-2011 Copyright (c) 2011, Bill Wilder – Use allowed under Creative Commons license.
Summary To fully leverage cloud computing we need to understand both the strengths and weaknesses of the cloud. In this talk, we will demonstrate how the.
Big Ideas in Software Architecture (in cloud or otherwise) Boston Azure User Group 27-October-2011 Copyright (c) 2011, Bill Wilder – Use allowed under.
Definition of terms Definition of terms Explain business conditions driving distributed databases Explain business conditions driving distributed databases.
Joan Wortman Architecting for the Cloud Bill Wilder An App in the Cloud is not a Cloud-Native App Boston Code Camp #19 08-Mar-2013 (2:50 – 4:00 PM EDT)
A Brief Overview by Aditya Dutt March 18 th ’ Aditya Inc.
Components of Windows Azure - more detail. Windows Azure Components Windows Azure PaaS ApplicationsWindows Azure Service Model Runtimes.NET 3.5/4, ASP.NET,
Introduction To Windows Azure Cloud
Training Workshop Windows Azure Platform. Presentation Outline (hidden slide): Technical Level: 200 Intended Audience: Developers Objectives (what do.
Windows Azure Tour Benjamin Day Benjamin Day Consulting, Inc.
Your First Azure Application Michael Stiefel Reliable Software, Inc.
Mostafa Abdollahi Mazandaran University Of Science And Technology January 2011.
Windows Azure Conference 2014 Deploy your Java workloads on Windows Azure.
Overview of Cloud Computing Sven Rosvall ACCU
The exponential growth of data –Challenges for Google,Yahoo,Amazon & Microsoft in web search and indexing The volume of data being made publicly available.
Hadoop as a Service Boston Azure / Microsoft DevBoston 07-Feb-2012 Copyright (c) 2011, Bill Wilder – Use allowed under Creative Commons license
Azure Best Practices How to Successfully Architect Windows Azure Apps for the Cloud 13-Mar-2013 (1:00 PM EDT) Bill Wilder An App in the Cloud is not (necessarily)
Except where noted contents © 2014 Development Partners Software Corporation Cloud Architecture Anti-Patterns.
1 Distributed Databases BUAD/American University Distributed Databases.
Bill Wilder – brief bio Bill Wilder has been a professional software developer for more than 20 years. Last year he founded the Boston Azure User Group,
Cloud-Native in Azure Zoran B. Djordjevic’s CSCI E-175 Cloud Computing and Software as a Service class at Harvard University 19-November-2010 Copyright.
Windows Azure. Azure Application platform for the public cloud. Windows Azure is an operating system You can: – build a web application that runs.
CS525: Big Data Analytics MapReduce Computing Paradigm & Apache Hadoop Open Source Fall 2013 Elke A. Rundensteiner 1.
 Mike Martin  Architect  MEET Member  Crew Member of Azug  Windows Azure Insider  Windows Azure MVP  
Windows Azure Web Sites Second-generation PaaS Boston Cloud Meetup 14-January-2014 (00:30) Boston Azure User Group
Scalability == Capacity * Density.
Cloud Architecture Patterns for Mere Mortals New England Code Camp #16 29-October-2011 Copyright (c) 2011, Bill Wilder – Use allowed under Creative Commons.
Except where noted contents © 2014 Development Partners Software Corporation the Microsoft Azure.
Except where noted contents © 2014 Development Partners Software Corporation the Microsoft Azure.
Architecture Patterns for Building Cloud-Native Applications NYC Code Camp 7 15-September-2012 (10:45 – noon) Boston Azure User Group
{ Tanya Chaturvedi MBA(ISM) Hadoop is a software framework for distributed processing of large datasets across large clusters of computers.
Microsoft Cloud Computing. Topics to be covered 1.Environmental Features of windows azure 2.What is Cloud Computing 3.Roles in Cloud Computing 4.Benefits.
Windows Azure Overview for IT Pros Anton Boyko. Intro to Cloud Computing Intro to Windows Azure Cloud Services Web Sites Virtual Machines Workload Options.
Hello Cloud… Mike Benkovich
Building Cloud Solutions Presenter Name Position or role Microsoft Azure.
(re)-Architecting cloud applications on the windows Azure platform CLAEYS Kurt Technology Solution Professional Microsoft EMEA.
Inspirirani ljudima. Ugasite mobitele. Hvala.. Paolo Pialorsi Senior Consultant PiaSys ( Publishing apps for SharePoint 2013 on Microsoft.
Azure SQL Database Lori Clark SQL Saturday 10/17/2015.
BIG DATA/ Hadoop Interview Questions.
GameChanger’s Rate Quote Issue Solution is Deployed to Microsoft Azure for a Fast, Flexible Direct to Consumer Insurance Sales Solution MICROSOFT AZURE.
Aaron Stanley King. What is SQL Azure? “SQL Azure is a scalable and cost-effective on- demand data storage and query processing service. SQL Azure is.
Presented by: Aaron Stanley King.  Benefits of SQL Azure  Features of SQL Azure  Demos, Demos, Demos!  How to query in SQL Azure  More Demos!  Recent.
Boston Code Camp October-2012 (1:30 – 2:40)
Accounting for Azure in Your Data Architecture
Cloud Architecture Patterns for Mere Mortals
Platform as a Service (PaaS)
Hadoop Aakash Kag What Why How 1.
DocFusion 365 Intelligent Template Designer and Document Generation Engine on Azure Enables Your Team to Increase Productivity MICROSOFT AZURE APP BUILDER.
Introduction to Distributed Platforms
Advanced Topics in Concurrency and Reactive Programming: Case Study – Google Cluster Majeed Kassis.
Building a Virtual Infrastructure
Exploring Azure Event Grid
Architecture Patterns for Scalability & Reliability
Hello Farmington! 4:30-5:30, then dinner.
Serverless CQRS in Azure!
New England Code Camp October-2010
File Manager for Microsoft Office 365, SharePoint, and OneDrive: Extensible Via Custom Connectors in Enterprise Deployments, Ideal for End Users OFFICE.
Outline Virtualization Cloud Computing Microsoft Azure Platform
Dell Data Protection | Rapid Recovery: Simple, Quick, Configurable, and Affordable Cloud-Based Backup, Retention, and Archiving Powered by Microsoft Azure.
microsoft cloud platform: enterprise-class architecture
DevBoston 07-February-2013 (6:00 PM)
Building global and highly-available services using Windows Azure
Presentation transcript:

Cloud-Native Architecture Patterns (Or… why your pre-cloud architecture won’t work so well in the cloud) Azure Florida Association 28-March-2012 Boston Azure User Group Bill Wilder Examples drawn from Windows Azure cloud platform

Bill Wilder Windows Azure MVP Windows Azure Consultant Boston Azure User Group Founder Cloud Architecture Patterns book (due 2012)

The Big Ideas 1.Horizontal over Vertical 2.MTTR over MTBF 3.Eventual over Strong Where Azure Fits

What’s the Big Idea? scale compute

Scale != Performance Scalable iff Performance constant as it grows Scale the Number of Users … Volume of Data … Across Geography Scale can be bi-directional (more or less) Investment α Benefit What does it mean to Scale?

Old School Excel and Word

Options: Scale Up (and Scale Down) or Scale Out (and Scale In) Terminology: Scaling Up/Down == Vertical Scaling Scaling Out/In == Horizontal Scaling Architectural Decision – Big decision… hard to change

Scaling Up: Scaling the Box.

Scaling Out: Adding Boxes autonomous nodes scale best

How do I Choose???? ?????? … Scale Up (Vertically) Scale Out (Horizontally). Not either/or! Part business, part technical decision (requirements and strategy) Consider Reliability (and SLA in Azure) Target VM size that meets min or optimal CPU, bandwidth, space

Where does Azure fit? scale compute

Queue-Centric Workflow Pattern Enables systems where the UI and back-end services are Loosely Coupled (Compare to CQRS at the end)

QCW in Windows Azure WE NEED: Compute resource to run our code Web Roles (IIS) and Worker Roles (w/o IIS) Reliable Queue to communicate Azure Storage Queues Durable/Persistent Storage Azure Storage Blobs & Tables; SQL Azure

QCW in Action Web Server Compute Service Reliable Queue Reliable Storage

Familiar Example: Thumbnailer Web Role (IIS) Web Role (IIS) Worker Role Worker Role Azure Queue Azure Blob UX implications: user does not wait for thumbnail

QCW enables Responsive Response to interactive users is as fast as a work request can be persisted Time consuming work done asynchronously Comparable total resource consumption, arguably better subjective UX UX challenge – how to express Async to users? – Communicate Progress – Display Final results

QCW enables Scalable Loosely coupled, concern-independent scaling – Get Scale Units right Blocking is Bane of Scalability – Decoupled front/back ends insulate from other system issues if… Order processing partner doing maintenance Twitter down server unreachable Internet connectivity interruption

General Case: Many Roles, Many Queues Web Role (IIS) Web Role (IIS) Worker Role Worker Role Web Role (IIS) Web Role (IIS) Web Role (IIS) Web Role (IIS) Worker Role Worker Role Worker Role Worker Role Worker Role Type 1 Worker Role Type 1 Worker Role Worker Role Worker Role Worker Role Worker Role Worker Role Worker Role Type 2 Worker Role Type 2 Queue Type 1 Queue Type 2 Queue Type 1 Queue Type 2 Queue Type 3 Remember: Investment α Benefit Optimize for CO$T EFFICIENCY Logical vs. Physical Architecture Worker Role Type 2 Worker Role Type 2 Worker Role Type 2 Worker Role Type 2 Worker Role Type 2 Worker Role Type 2

QCW enables Distribution Scale out systems better suited than monolithic for geographic distribution – More granular  flexible – Reduce latency via geographic distribution – Failure need not be binary

From QCW  CQRS CQRS – Command Query Responsibility Segregation Commands change state Queries ask for current state Any operation is one or the other Usually includes Event Sourcing Usually modeled using Domain Driven Design (DDD)

What’s the Big Idea? #fail

MTBF… vs. MTTR…

Degrees of Failure My Virtual Machine – Hardware failure – Software failure – Restart [Cloud] Service or Service Network – Retry Datacenter – Recover (?)

Where does Azure fit? #fail

Familiar Example: Thumbnailer Web Role (IIS) Web Role (IIS) Worker Role Worker Role Azure Queue Azure Blob UX implications: user does not wait for thumbnail

Reliable Queue & 2-step Delete (IIS) Web Role (IIS) Web Role Worker Role Worker Role var url = “ queue.AddMessage( new CloudQueueMessage( url ) ); var invisibilityWindow = TimeSpan.FromSeconds( 10 ); CloudQueueMessage msg = queue.GetMessage( invisibilityWindow ); queue.DeleteMessage( msg ); Queue

QCW requires Idempotent Perform idempotent operation more than once, end result same as if we did it once Example with Thumbnailing (easy case) App-specific concerns dictate approaches – Compensating transactions – Last in wins – Many others possible – hard to say

QCW expects Poison Messages A Poison Message cannot be processed – Error condition for non-transient reason – Detect via CloudQueueMessage.DequeueCount property Be proactive – Falling off the queue may kill your system Message TTL = 7 days by default in Azure Determine a Max Retry policy – May differ by queue object type or other criteria – Then what? Delete, move to “bad” queue, alert human, …

CQRS requires “Plan for Failure” There will be VM (or Azure role) restarts – Hardware failure, O/S patching, crash (bug) Fabric Controller honors Fault Domains Bake in handling of restarts into our apps – Restarts are routine: system “just keeps working” – Idempotent support important again Not an exception case! Expect it!

Typical SiteAny 1 Role InstOverall System Operating System Upgrade Application Code Update Scale Up, Down, or In Hardware Failure Software Failure (Bug) Security Patch What’s Up? Reliability as EMERGENT PROPERTY

What about the DATA? You: Azure Web Roles and Azure Worker Roles – Taking user input, dispatching work, doing work – Follow a decoupled queue-in-the-middle pattern – Stateless compute nodes “Hard Part”: persistent data, scalable data – Azure Queue, Blob, Table, SQL Azure – Three copies of each byte – Blobs and Tables geo-replicated – Retry and Throttle!

Retrying Retry Logic for Transient Failures in SQL Azure failures-in-sql-azure.aspx Overview of Retry Policies in.NET SDK of-retry-policies-in-the-windows-azure-storage-client-library.aspx us/library/microsoft.windowsazure.storageclient.cloudblobclient.retrypolicy.aspx

What’s the Big Idea? scale data

Foursquare #Fail October 4, 2010 – trouble begins… After 17 hours of downtime over two days… “Oct. 5 10:28 p.m.: Running on pizza and Red Bull. Another long night.” WHAT WENT WRONG?

What is Sharding? Problem: one database can’t handle all the data – Too big, not performant, needs geo distribution, … Solution: split data across multiple databases – One Logical Database, multiple Physical Databases Each Physical Database Node is a Shard Most scalable is Shared Nothing design – May require some denormalization (duplication)

Sharding is Difficult What defines a shard? (Where to put stuff?) – Example by geography: customer_us, customer_fr, customer_cn, customer_ie, … – Use same approach to find records What happens if a shard gets too big? – Rebalancing shards can get complex – Foursquare case study is interesting Query / join / transact across shards Cache coherence, connection pool management

Where does Azure fit? scale data

SQL Azure is SQL Server Except… Common SQL Server Specific (for now) SQL Azure Specific “Just change the connection string…” Full Text Search Native Encryption Many more… Limitations 150 GB size limit New Capabilities Highly Available Rental model Coming: Backups & point-in-time recovery SQL Azure Federations More… Additional information on Differences:

SQL Azure Federations for Sharding Single “master” database – “Query Fanout” makes partitions transparent – Instead of customer_us, customer_fr, etc… we are back to customer database Handles redistributing shards Handles cache coherence Simplifies connection pooling Recently released! federations-robust-connectivity-model-for-federated-data.aspx federations-robust-connectivity-model-for-federated-data.aspx

What’s the Big Idea? big data

Five exabytes of data created every two days - Eric Schmidt (CEO Google at the time) As much as from the dawn of civilization up until 2003

Three Vs Volume  lots of it already Velocity  more of it every day Variety  many sources, many formats “Big Data” Challenge

Short History of Hadoop ////// 1. Inspired by: Google Map/Reduce paper – Google File System (GFS) – Goals: distributed, fault tolerant, fast enough 2. Born in: Lucene Nutch project Built in Java Hadoop cluster appears as single über- machine

Hadoop: batch processing, big data Batch, not real-time or transactional Scale out with commodity hardware Big customers like LinkedIn and Yahoo! – Clusters with 10s of Petabytes (pssst… these fail… daily) Import data from Azure Blob, Data Market, S3 – Or from files, like we will do in our example

Where does Azure fit? big data

Hadoop on Azure

done questions

Questions? Comments? More information? ?

Bill Wilder Windows Azure MVP Windows Azure Consultant Boston Azure User Group Founder Cloud Architecture Patterns book (due 2012)

done (really done)

done (really done)

Questions? Comments? More information? ?

BostonAzure.org Boston Azure cloud user group Focused on Microsoft’s PaaS cloud platform Late Thursday, monthly, 6:00-8:30 PM at NERD – Food; wifi; free; great topics; growing community Boston Azure Boot Camp: June 2012 ( planning ) Follow on More info or to join our Meetup.com group:

Contact Me Looking for … consulting help with Windows Azure Platform? someone to bounce Azure or cloud questions off? a speaker for your user group or company technology event? Just Ask! Bill