SlideShare una empresa de Scribd logo
1 de 61
Descargar para leer sin conexión
10 things every architect needs to know




Eric Nelson | ISV Application Architect | Microsoft UK
eric.nelson@microsoft.com | http://bit.ly/ericnelson | http://twitter.com/ericnel



                                                                                    Page 1
Assumption

• You already have some
  familiarity with the Windows
  Azure Platform

• If you don’t then you will still
  learn stuff
   – But you will be missing some
     context. Sorry
   – Also check out
      • http://bit.ly/azuretrenchesbookvol1
      • http://ukazure.ning.com/events



                                              Page 2
Agenda   Overview
         •   Dynamic environment
         •   Role Instances
         •   Latency & timeouts
         •   Transactions & bandwidth
         •   Data/state
         •   Data sensitivity
         Summary




                                        Page 3
Overview




           Page 4
Windows Azure Platform

         makes it easy and cost effective
            to run your applications
               and store your data
          inside Microsoft Data Centres

              using existing skills

                and integrate with
      your existing on-premise applications




                                              Page 5
Windows Azure Platform




                         Page 6
Your code runs in Hosted Services
made up of Roles




                                    Page 7
Your Roles are code + configuration




                                      Page 8
You choose which type(s) of Role
to run your code in




                                   Page 9
At runtime you can have
multiple instances of your Roles




                               Load
                              Balancer
        http://yourapp.cloudapp.net




                                         Page 10
You store your data in Windows Azure
Storage




                                       Page 11
And/or you store your data in SQL Azure




                                          Page 12
Vs traditional Windows development


           It’s not really   It’s not really
           different.        different.
           There is just     There is just
           more of it        less of it




     Therefore many Windows Web development
                best practices apply




                                               Page 13
“Typical” Azure Application
                              Windows Azure Platform
                                                               Your Data
                        Web Site
                       Web Site
                      Web ASMX,WCF)
                      (ASPX, Role
                     (ASPX, ASMX,
                                  WCF)
                                                                 Queues
                     (ASPX, WCF, PhP)

           L
           B

                         Worker
                         Worker                 L
                                                                 Blobs
                         Service
                          Role
                                                B



Internet                 Your Code                               Tables




                   Your Relational Data
                Tables       Views        SPs       Triggers



                                                                    Page 14
Is it just about this?
                      “On and Off “                            “Growing Fast“




                                                     Compute
           Compute             Inactivity
                                Period
                                                                              Average
                     Average                Usage                              Usage

                                 Time                                Time


            On and off workloads (e.g. batch         Successful services needs to
            job)                                     grow/scale
            Over provisioned capacity is wasted      Keeping up w/growth is big IT
            Time to market can be cumbersome         challenge
                                                     Complex lead time for deployment


                     “Unpredictable                  “Predictable Bursting“
                       Bursting“
         Compute




                               Average               Compute        Average
                                Usage                                Usage
                               Time                                  Time


            Unexpected/unplanned peak in demand      Services with micro seasonality trends
            Sudden spike impacts performance         Peaks due to periodic increased demand
            Can’t over provision for extreme cases   IT complexity and wasted capacity


                                                                                              Page 15
Or is it also about this?
                     “I want to try                                “Departmental“
                    something now“

         Machines




                                                        Machines
                             Time                                           Time


            Need to quickly provision new                  Need to quickly provision new
            machines for a temporary period of             machines for a departmental solution
            time




                       “Just store                                  “Extend to
                    data in the Cloud“                              the Cloud“

                With all processing elsewhere                 Extend existing applications



                    “Migrate existing                   “New hybrid services“
                      applications“

                Benefits of reduced operational costs         On-premise and Cloud aka S+S



                                                                                                  Page 16
Behavioral changes


                          Developers
                             feel
                          empowered




                                          Cost of
           Developers
                                       architectural
             become
                                       decisions is
          entrepreneurs
                                       more visible




                                                       Page 17
Agenda   Overview
         •   Role Instances
         •   Dynamic environment
         •   Latency & timeouts
         •   Transactions & bandwidth
         •   Data/state
         •   Data sensitivity
         Summary




                                        Page 18
Dynamic Environment




                      Page 19
Dynamic Environment means…


                                                      Windows
    Traditional                                        Azure
Control over network topology      Admin          Limited control over IPs, ports
and machines                       Control

Consistent bandwidth with
stable latency                     Latency       Variable latency and bandwidth


Control over machine                             Machine names can change
identification                  Identification   every time an instance starts


                                                 Limited control over lifetime,
Control over machine lifetime     Volatility     state becomes transient




                                                                                    Page 20
Admin control (or lack of it)

• Limited access to local environment and state
  – No admin rights and privileges are available (yet).
  – No pre-setup or configuration can be done (yet).
• Code defines exact set up of roles which
  provides uniformity across instances




                                                          Page 21
Volatility: Your instances will be stopped


     Patching



                                              React
                                   • When an instance goes away, it’s
                 Notification of     gone, including its state!
     Moving         instance       • Properly handle state so it can
                lifecycle events     be preserved.




     Failure




                                                                        Page 22
Role instance management example




                                   Page 23
Dynamic networking
• Dynamic environment means dynamic
  networking
  – Ports changes
  – IPs change
  – Cannot rely on node IPs or machine names
• The traditional way of networking may no longer
  be the best fit.
  – Direct communication is possible
  – Shift to indirect
     • Using Windows Azure storage
     • Using Windows Azure Service Bus




                                                Page 24
Role Instances




                 Page 25
Instances of Role Types
          “Typical Application”                           But…


                   Finance
                     Web
                   Message                     Finance
                                                 Web             Web
                     Role A
                                               Message           Role A
                                                Role A




                    Queue
                                                         Queue
                          10
                          Sec                             10
                                                          Sec
                       Worker
                       Role A                    Worker          Worker
                                                 Role A          Role A


TIP: Queue writes are approx 20/s per writer
                                                                          Page 26
Consolidation of Role Types
       Scalable Message Passing                         Meta-Message Passing


     HR           Finance           Sales            HR            Finance       Sales
  Message         Message          Message         Message        Message       Message




                                                               Meta-queue
                                                                     HR
   HR              Finance          Sales
                                                                  Finance
  Queue            Queue            Queue
                                                                   Sales
          10             10                5                      Finance
          Sec            Sec              Sec                            10
                                                                         Sec
     Worker           Worker           Worker                Meta-worker Role
     Role             Role             Role
                                                               Message Type?

TIP: Web Roles can communicate direct to Workers

TIP: Maximum time to process a Q Item is 2 hours
                                                                                     Page 27
Elasticity and Roles

            From this
                                                             To this


  Finance
    Web                 Web                 Finance
                                                Web                Web               Web
  Message               Role A
   Role A                                   Message                Role A            Role A
                                               Role A




                                 10 to 15
            Queue
                                 minutes                    Queue

             10
             Sec                                                 10
                                                                 Sec

    Worker              Worker
                                                        Worker              Worker
    Role A              Role A
                                                        Role A              Role A



                                                                                      Page 28
Latency and Timeouts




                       Page 29
Latency

          On premises application
                                                    App
                                                    Data
               Service                  App
               Request

             Consistent and accepted latencies




          Cloud based application
                                                    App
            Service                                 Data
                                      App
            Request

          Increases in quantity and
          variability of latencies




                        TIP: Expect Web Role to SQL Azure to take about twice as long

                                                                                    Page 30
Timeout

On premises application
                                                             Try to connect
      Service
                               App               App
      Request
                                                 Data

   Consistent, reliable
   connectivity and access
                                                              Connection      Yes   Continue doing
                                                              Successful?                work

Cloud based application

                                     Timeouts?                       No
  Service
                             App                 App
  Request
                                                 Data
                                                        No
                                                                Tried 5       Yes
Increased likelihood
of timeouts
                                                                times?                 Fail




                                                                                              Page 31
Timeout Retry Code Example




                             Page 32
Timeout Retry Code Example




                             Page 33
Timeout Retry Code Example




TIP: There is a new code library for all this!

                                                 Page 34
Transactions & bandwidth




                           Page 35
Transactions & bandwidth

•Bandwidth
  • Charged for usage
  • Functionality that was not bandwidth         Access Control
    based may now be effected.               Per AC transactions/month
     • E.g. using Windows Azure Blobs
        instead of writing to disk              Bandwidth
                                             Per GB transfer to/from datacenter
•Transactions
  • Charged by quantity                         Storage
  • Access types that were not               Per GB stored & transactions
    traditionally on a transaction count
    may now be effected.
                                                 Service Bus
      • E.g. using Access Control Services   Per connection/month
         and Storage
                                                SQL Azure
                                             Per GB allocated database
                                             by day

                                                                         Page 36
Data center usage costing comparison


                 Web Role                                             Web Role




                   Transaction                                        Transaction
Browser             Image Download      Blob               Browser      Image Download   Blob
                   Bandwidth                                          Bandwidth
                     Egress                                             Egress




TIP: Increasing the size of the VM will increase network throughput
                                                                                           Page 37
Batch Payloads
 Frequent message                     Option 1:
 passing with a small                 Serialized




                                                                                     # of transactions
 amount of data can                   Message
                                      Passing




                                                                 Header
 effect performance and                                 Header
                                                       Header
 cost.                                               Header
                                                   Header




                                                                           Content
                         Content                   Content
   Header                                                        Total Bytes
     or                  Content
  Overhead               Content
   Content               Content                    Header
  Message




                                                                           Content
  Structure                                         Content




                                                                  Header
                                      Option 2;
                                                    Content




                                                                                         # of txs
TIP: Q items 8KB limit                Packaged
                                      Message       Content
TIP: Watch out for data formats!      Passing       Content      Total Bytes
TIP: Use storage APIs to group transactions
                                                                                     Page 38
Batch Queries

     Single Query Use               Batch Query Use

  Query                 Worker   Query
                        Role A
                                 Query
                                                      Worker
                        Worker   Query
  Query                                               Role
                        Role B   Query

                        Worker
                                 Query
  Query                                  Reduction of bandwidth
                        Role C
                                            and transactions!
                                 Query
                        Worker
  Query                          Query
                        Role D
                                 Query                Worker
                                                      Role
                        Worker   Query
  Query                 Role E
                                 Query


                                                          Page 39
Be aware of “new costs” e.g. polling
•   Consider introducing polling a queue every 100ms
•   25,920,000 polls/month
•   £0.0061 per 10,000 storage transactions
•   Therefore it will cost
    – £15.81/month
• To get an SLA, need two worker roles polling
    – £31.62/month
• Cost of two workers
    – £0.0728 per hour x 720 x 2
    – £104.83/month
• Total cost £136.45/month



                                                       Page 40
Be aware of cost


                             140 million                                  $140
    Transactions per Month



                             120 million                                  $120




                                                                                 Cost per Month
                             100 million                                  $100

                              80 million                                  $80

                              60 million                                  $60

                              40 million                                  $40

                              20 million                                  $20

                                      0
                                           1 instance       5 instances
                                            100 ms            100 ms
                                           Instances polling storage

                                                                                                  Page 41
Be aware of cost


                             140 million                                  $140
    Transactions per Month



                             120 million                                  $120




                                                                                 Cost per Month
                             100 million                                  $100

                              80 million                                  $80

                              60 million                                  $60

                              40 million                                  $40

                              20 million                                  $20

                                      0
                                           5 instances      5 instances
                                             100 ms          1 second
                                           Instances polling storage

                                                                                                  Page 42
Be aware of cost

Be wary of frequent transactions with little work being done

                                  140 million                                           $140
         Transactions per Month



                                  120 million                                           $120




                                                                                               Cost per Month
                                                                     Unnecessary Cost
                                  100 million                                           $100

                                   80 million                                           $80

                                   60 million                                           $60

                                   40 million                                           $40

                                   20 million                                           $20

                                           0
                                                5 instances      Polls which
                                                  100 ms         found work
                                                 Instances polling storage

                                                                                                                Page 43
Polling best practices

• Poll less often
• Synchronize polling with
  business needs               8am to       12am til 4am
                               12pm –         – every 1
                             every 100ms       minute




                                 4am til 8am – every
                                    10 seconds




                                                           Page 44
Polling best practices cont.
    Scalable Message Passing                 Meta-Message Passing


  HR         Finance      Sales           HR            Finance       Sales
Message      Message     Message        Message        Message       Message




                                                    Meta-queue
                                                          HR
 HR          Finance      Sales
                                                       Finance
Queue        Queue        Queue
                                                        Sales
       10         10              5                    Finance
       Sec        Sec            Sec                          10
                                                              Sec
  Worker       Worker          Worker             Meta-worker Role
  Role         Role            Role
                                                    Message Type?




                                                                          Page 45
Data/State




             Page 46
Data/State

• Windows Azure instances are highly dynamic
  – Role instance local data is volatile
• Instances are independent
  – State changes are not reflected in other instances
• Therefore
  – Local instance storage is only useful for temporary
    data or as a cache
  – All other data needs to be moved to durable storage




                                                          Page 47
You have many choices for data
                   Relational Database


                   Structured Storage


                   Unstructured Storage



                   NTFS Drive


                   Service Communication

                                           Page 48
Side by Side Evaluation
                                                                     Single SQL
                             Single Blob   Drive   Queue    Table      Azure
                                                                      Database
Structured Data                                               Y           Y
Relational Database                                                      Y
Server Side Processing                                                   Y
Direct Access from outside
                                 Y                   Y        Y          Y
Azure
Messaging Infrastructure                             Y
Persistent Storage               Y          Y      1 week     Y          Y
                             200 GB/ 1
Size Limit                                 1 TB    100 TB   100 TB    50 GB (*)
                                TB




                                                                                  Page 49
Example: Registry/Configuration/User
Settings
A traditional set of data that is traditionally stored on the local
environment is configuration and user settings. Commonly this is stored
in the registry, xml or ini files.


                Options                    Best Case Usage

      Blob storage                  Configuration file that is read
                                    only once during app load
      SQL database                  Used in environments where a
                                    SQL database already exists
      Windows Azure table           User settings that may be
                                    changed externally from the
                                    environment




                                                                      Page 50
Tables for storing Data

Why do this?
Partition     Row Key       Data         Data                  Data          Data
Key
Customer ID   Description   Name         Credit Card #         Order Total   Tracking ID
1             Customer      John Smith   xxxx-xxxx-xxxx-xxxx




                                                                                              Partition A
1             Order – 1                                        £35.12        Z783lhs
1             Order – 2                                        £75.00        Z829bhb
2             Customer      Bill Johnson xxxx-xxxx-xxxx-xxxx




                                                                                             Partition B
2             Order – 3                                        £10.00        Z778asd
2             Order – 4                                        £42.00        Z239uhy
3             Customer      Travis Jones xxxx-xxxx-xxxx-xxxx




                                                                                             Partition C
3             Order – 5                                        £25.93        Z329nps
3             Order – 6                                        £80.94        Z440ydd

                                                                                           Page 51
Selecting keys is … key
Consider searching an address book



       Search By         Partition Key                    Row Key
     Name            Last name + First initial First name + Middle initial
     Phone number Area code                    Number
     Address         County + city             House number + Street
                                               name




                           TIP: Table deletes take time
                           TIP: Replicate data to avoid joins and increase indexes
                                                                              Page 52
Data Sensitivity




                   Page 53
Segmentation


          Online Shop                                Online Shop




                                                        Product
                                                       catalogue


 Purchasing          Product
  Database          catalogue




                                Secure Transaction
                                   (Service Bus)



                                                                   Page 54
Sharding



       Contact ID
                               Contact ID
      First Name              First Name
                                                     Cloud
                               Last Name
       Last Name
                          Shipping Information
  Shipping Information

 Customer Credit Card #

    Social Security #
                                Contact ID
      Billing Data
                          Customer Credit Card #   On Premises
   Other Information
                             Social Security #
      On Premises
                             Other Information


                                                                 Page 55
Encryption



       Contact ID
                               Contact ID
      First Name              First Name
                                                   Cloud
                               Last Name
       Last Name
                          Shipping Information
  Shipping Information       £!”$&$%!&£%

 Customer Credit Card #      !£$&!%£&%*

    Social Security #         £”$&!%*^(&

      Billing Data            ^$”$&%$”&
                                                 On Premises
   Other Information

      On Premises



                                                               Page 56
Agenda   Overview
         •   Role Instances
         •   Dynamic environment
         •   Latency & timeouts
         •   Transactions & bandwidth
         •   Data/state
         •   Data sensitivity
         Summary




                                        Page 57
Summary
• Windows Web Development best practices apply
• But
• Cost becomes surprisingly significant in shaping
  architectures
• Plenty of early adopters, therefore
  – Good Architecture guidance is now appearing
  – Plenty of detail to dig into




                                                  Page 58
NEXT STEPS
  For latest slides and all the links http://bit.ly/ericnelson
  For more resources and information http://bit.ly/startazure

  As an ISV intending to explore/adopt azure, sign up to http://bit.ly/ukmpr
  and come along and meet with us http://blogs.msdn.com/b/ukisvdev




      Eric Nelson | ISV Application Architect | Microsoft UK
      eric.nelson@microsoft.com | http://bit.ly/ericnelson | http://twitter.com/ericnel


                                                                                          Page 59
SQL Azure Labs




                 Page 60
Demo




       Page 61

Más contenido relacionado

La actualidad más candente

Windows Azure & How to Deploy Wordress
Windows Azure & How to Deploy WordressWindows Azure & How to Deploy Wordress
Windows Azure & How to Deploy Wordress
George Kanellopoulos
 
A Step By Step Guide To Put DB2 On Amazon Cloud
A Step By Step Guide To Put DB2 On Amazon CloudA Step By Step Guide To Put DB2 On Amazon Cloud
A Step By Step Guide To Put DB2 On Amazon Cloud
Deepak Rao
 

La actualidad más candente (20)

Understanding The Azure Platform March 2010
Understanding The Azure Platform   March 2010Understanding The Azure Platform   March 2010
Understanding The Azure Platform March 2010
 
Building Cloud-Native Applications with Microsoft Windows Azure
Building Cloud-Native Applications with Microsoft Windows AzureBuilding Cloud-Native Applications with Microsoft Windows Azure
Building Cloud-Native Applications with Microsoft Windows Azure
 
Cloud-powered Continuous Integration and Deployment architectures - Jinesh Varia
Cloud-powered Continuous Integration and Deployment architectures - Jinesh VariaCloud-powered Continuous Integration and Deployment architectures - Jinesh Varia
Cloud-powered Continuous Integration and Deployment architectures - Jinesh Varia
 
Windows Azure & How to Deploy Wordress
Windows Azure & How to Deploy WordressWindows Azure & How to Deploy Wordress
Windows Azure & How to Deploy Wordress
 
A Step By Step Guide To Put DB2 On Amazon Cloud
A Step By Step Guide To Put DB2 On Amazon CloudA Step By Step Guide To Put DB2 On Amazon Cloud
A Step By Step Guide To Put DB2 On Amazon Cloud
 
Cloud Architecture best practices
Cloud Architecture best practicesCloud Architecture best practices
Cloud Architecture best practices
 
Windows Azure Platform - The Color of Cloud Computing
Windows Azure Platform - The Color of Cloud ComputingWindows Azure Platform - The Color of Cloud Computing
Windows Azure Platform - The Color of Cloud Computing
 
Oracle Peoplesoft on AWS: A quick introduction
Oracle Peoplesoft on AWS: A quick introductionOracle Peoplesoft on AWS: A quick introduction
Oracle Peoplesoft on AWS: A quick introduction
 
Virtualizing Apache Spark and Machine Learning with Justin Murray
Virtualizing Apache Spark and Machine Learning with Justin MurrayVirtualizing Apache Spark and Machine Learning with Justin Murray
Virtualizing Apache Spark and Machine Learning with Justin Murray
 
SQL Server Lift & Shift on Azure - SQL Saturday 921
SQL Server Lift & Shift on Azure - SQL Saturday 921SQL Server Lift & Shift on Azure - SQL Saturday 921
SQL Server Lift & Shift on Azure - SQL Saturday 921
 
MSDN - Converting an existing ASP.NET application to Windows Azure
MSDN - Converting an existing ASP.NET application to Windows AzureMSDN - Converting an existing ASP.NET application to Windows Azure
MSDN - Converting an existing ASP.NET application to Windows Azure
 
Spring in the Cloud
Spring in the CloudSpring in the Cloud
Spring in the Cloud
 
Global Netflix Platform
Global Netflix PlatformGlobal Netflix Platform
Global Netflix Platform
 
Windows Azure Design Patterns
Windows Azure Design PatternsWindows Azure Design Patterns
Windows Azure Design Patterns
 
Migrating Data and Databases to Azure
Migrating Data and Databases to AzureMigrating Data and Databases to Azure
Migrating Data and Databases to Azure
 
SQL 2014 hybrid platform - Azure and on premise
SQL 2014 hybrid platform - Azure and on premise SQL 2014 hybrid platform - Azure and on premise
SQL 2014 hybrid platform - Azure and on premise
 
Azure in Developer Perspective
Azure in Developer PerspectiveAzure in Developer Perspective
Azure in Developer Perspective
 
Linux en Microsoft Azure Global Azure Lima
Linux en Microsoft Azure Global Azure LimaLinux en Microsoft Azure Global Azure Lima
Linux en Microsoft Azure Global Azure Lima
 
Migrating Customers to Microsoft Azure: Lessons Learned From the Field
Migrating Customers to Microsoft Azure: Lessons Learned From the FieldMigrating Customers to Microsoft Azure: Lessons Learned From the Field
Migrating Customers to Microsoft Azure: Lessons Learned From the Field
 
Seeding The Cloud
Seeding The CloudSeeding The Cloud
Seeding The Cloud
 

Similar a 10 things ever architect should know about the Windows Azure Platform - ericnel

Hanu cloud computing expertise
Hanu cloud computing expertiseHanu cloud computing expertise
Hanu cloud computing expertise
Hanu Software
 
Drupal in the Cloud with Windows Azure
Drupal in the Cloud with Windows AzureDrupal in the Cloud with Windows Azure
Drupal in the Cloud with Windows Azure
Ford AntiTrust
 
Programatori cu capul in nori
Programatori cu capul in noriProgramatori cu capul in nori
Programatori cu capul in nori
Alex Popescu
 

Similar a 10 things ever architect should know about the Windows Azure Platform - ericnel (20)

Windows Azure For Architects
Windows Azure For ArchitectsWindows Azure For Architects
Windows Azure For Architects
 
Hanu cloud computing expertise
Hanu cloud computing expertiseHanu cloud computing expertise
Hanu cloud computing expertise
 
BOI 2011 - Be what's next
BOI 2011 - Be what's nextBOI 2011 - Be what's next
BOI 2011 - Be what's next
 
Cantine de Nantes
Cantine de NantesCantine de Nantes
Cantine de Nantes
 
Spring into the Cloud - JDC2012 Cairo, Egypt
Spring into the Cloud - JDC2012 Cairo, EgyptSpring into the Cloud - JDC2012 Cairo, Egypt
Spring into the Cloud - JDC2012 Cairo, Egypt
 
Cloud Computing in Organization
Cloud Computing in OrganizationCloud Computing in Organization
Cloud Computing in Organization
 
Jumpstart Azure
Jumpstart AzureJumpstart Azure
Jumpstart Azure
 
Spring Into the Cloud
Spring Into the CloudSpring Into the Cloud
Spring Into the Cloud
 
FewebPlus @ microsoft 19 april 2010 cloud continuum
FewebPlus @ microsoft 19 april 2010 cloud continuumFewebPlus @ microsoft 19 april 2010 cloud continuum
FewebPlus @ microsoft 19 april 2010 cloud continuum
 
Cloud Computing Tutorial - Jens Nimis
Cloud Computing Tutorial - Jens NimisCloud Computing Tutorial - Jens Nimis
Cloud Computing Tutorial - Jens Nimis
 
IIR Congres ICT & Recht - Cloud Computing - Peter de Haas - Microsoft - 20-04...
IIR Congres ICT & Recht - Cloud Computing - Peter de Haas - Microsoft - 20-04...IIR Congres ICT & Recht - Cloud Computing - Peter de Haas - Microsoft - 20-04...
IIR Congres ICT & Recht - Cloud Computing - Peter de Haas - Microsoft - 20-04...
 
MEW22 22nd Machine Evaluation Workshop Microsoft
MEW22 22nd Machine Evaluation Workshop MicrosoftMEW22 22nd Machine Evaluation Workshop Microsoft
MEW22 22nd Machine Evaluation Workshop Microsoft
 
Windows Azure Platform Overview
Windows Azure Platform OverviewWindows Azure Platform Overview
Windows Azure Platform Overview
 
5 Cloud Commandments - Why Cloud Management Makes Sense
5 Cloud Commandments - Why Cloud Management Makes Sense5 Cloud Commandments - Why Cloud Management Makes Sense
5 Cloud Commandments - Why Cloud Management Makes Sense
 
The Modern Web Part 4: Cloud Computing
The Modern Web Part 4: Cloud ComputingThe Modern Web Part 4: Cloud Computing
The Modern Web Part 4: Cloud Computing
 
AbiCloud Webinar 1.0
AbiCloud Webinar 1.0AbiCloud Webinar 1.0
AbiCloud Webinar 1.0
 
Running a Lean Startup with AWS
Running a Lean Startup with AWSRunning a Lean Startup with AWS
Running a Lean Startup with AWS
 
Drupal in the Cloud with Windows Azure
Drupal in the Cloud with Windows AzureDrupal in the Cloud with Windows Azure
Drupal in the Cloud with Windows Azure
 
RightScale Sydney Customer Appreciation Day
RightScale Sydney Customer Appreciation DayRightScale Sydney Customer Appreciation Day
RightScale Sydney Customer Appreciation Day
 
Programatori cu capul in nori
Programatori cu capul in noriProgramatori cu capul in nori
Programatori cu capul in nori
 

Más de Eric Nelson

Windows Azure Overview
Windows Azure OverviewWindows Azure Overview
Windows Azure Overview
Eric Nelson
 
SQL Data Service Overview
SQL Data Service OverviewSQL Data Service Overview
SQL Data Service Overview
Eric Nelson
 

Más de Eric Nelson (17)

SQL Azure Dec 2010 Update
SQL Azure Dec 2010 UpdateSQL Azure Dec 2010 Update
SQL Azure Dec 2010 Update
 
Technology Roadmap by ericnel
Technology Roadmap by ericnelTechnology Roadmap by ericnel
Technology Roadmap by ericnel
 
Lap around the Windows Azure Platform - ericnel
Lap around the Windows Azure Platform - ericnelLap around the Windows Azure Platform - ericnel
Lap around the Windows Azure Platform - ericnel
 
Windows Azure Platform best practices by ericnel
Windows Azure Platform best practices by ericnelWindows Azure Platform best practices by ericnel
Windows Azure Platform best practices by ericnel
 
Looking at the clouds through dirty windows
Looking at the clouds through dirty windows Looking at the clouds through dirty windows
Looking at the clouds through dirty windows
 
SQL Azure Overview for Bizspark day
SQL Azure Overview for Bizspark daySQL Azure Overview for Bizspark day
SQL Azure Overview for Bizspark day
 
Building An Application For Windows Azure And Sql Azure
Building An Application For Windows Azure And Sql AzureBuilding An Application For Windows Azure And Sql Azure
Building An Application For Windows Azure And Sql Azure
 
Entity Framework 4 In Microsoft Visual Studio 2010
Entity Framework 4 In Microsoft Visual Studio 2010Entity Framework 4 In Microsoft Visual Studio 2010
Entity Framework 4 In Microsoft Visual Studio 2010
 
Windows Azure In 30mins for none technical audience
Windows Azure In 30mins for none technical audienceWindows Azure In 30mins for none technical audience
Windows Azure In 30mins for none technical audience
 
Dev305 Entity Framework 4 Emergency Slides
Dev305 Entity Framework 4 Emergency SlidesDev305 Entity Framework 4 Emergency Slides
Dev305 Entity Framework 4 Emergency Slides
 
Design Considerations For Storing With Windows Azure
Design Considerations For Storing With Windows AzureDesign Considerations For Storing With Windows Azure
Design Considerations For Storing With Windows Azure
 
What Impact Will Entity Framework Have On Architecture
What Impact Will Entity Framework Have On ArchitectureWhat Impact Will Entity Framework Have On Architecture
What Impact Will Entity Framework Have On Architecture
 
Windows Azure Overview
Windows Azure OverviewWindows Azure Overview
Windows Azure Overview
 
SQL Data Service Overview
SQL Data Service OverviewSQL Data Service Overview
SQL Data Service Overview
 
Entity Framework v1 and v2
Entity Framework v1 and v2Entity Framework v1 and v2
Entity Framework v1 and v2
 
Entity Framework Overview
Entity Framework OverviewEntity Framework Overview
Entity Framework Overview
 
SQL Server 2008 Overview
SQL Server 2008 OverviewSQL Server 2008 Overview
SQL Server 2008 Overview
 

Último

Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
WSO2
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
panagenda
 

Último (20)

EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWEREMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
 
CNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In PakistanCNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In Pakistan
 
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
 
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
 
ICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesICT role in 21st century education and its challenges
ICT role in 21st century education and its challenges
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 AmsterdamDEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
 
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdfRising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
 

10 things ever architect should know about the Windows Azure Platform - ericnel

  • 1. 10 things every architect needs to know Eric Nelson | ISV Application Architect | Microsoft UK eric.nelson@microsoft.com | http://bit.ly/ericnelson | http://twitter.com/ericnel Page 1
  • 2. Assumption • You already have some familiarity with the Windows Azure Platform • If you don’t then you will still learn stuff – But you will be missing some context. Sorry – Also check out • http://bit.ly/azuretrenchesbookvol1 • http://ukazure.ning.com/events Page 2
  • 3. Agenda Overview • Dynamic environment • Role Instances • Latency & timeouts • Transactions & bandwidth • Data/state • Data sensitivity Summary Page 3
  • 4. Overview Page 4
  • 5. Windows Azure Platform makes it easy and cost effective to run your applications and store your data inside Microsoft Data Centres using existing skills and integrate with your existing on-premise applications Page 5
  • 7. Your code runs in Hosted Services made up of Roles Page 7
  • 8. Your Roles are code + configuration Page 8
  • 9. You choose which type(s) of Role to run your code in Page 9
  • 10. At runtime you can have multiple instances of your Roles Load Balancer http://yourapp.cloudapp.net Page 10
  • 11. You store your data in Windows Azure Storage Page 11
  • 12. And/or you store your data in SQL Azure Page 12
  • 13. Vs traditional Windows development It’s not really It’s not really different. different. There is just There is just more of it less of it Therefore many Windows Web development best practices apply Page 13
  • 14. “Typical” Azure Application Windows Azure Platform Your Data Web Site Web Site Web ASMX,WCF) (ASPX, Role (ASPX, ASMX, WCF) Queues (ASPX, WCF, PhP) L B Worker Worker L Blobs Service Role B Internet Your Code Tables Your Relational Data Tables Views SPs Triggers Page 14
  • 15. Is it just about this? “On and Off “ “Growing Fast“ Compute Compute Inactivity Period Average Average Usage Usage Time Time On and off workloads (e.g. batch Successful services needs to job) grow/scale Over provisioned capacity is wasted Keeping up w/growth is big IT Time to market can be cumbersome challenge Complex lead time for deployment “Unpredictable “Predictable Bursting“ Bursting“ Compute Average Compute Average Usage Usage Time Time Unexpected/unplanned peak in demand Services with micro seasonality trends Sudden spike impacts performance Peaks due to periodic increased demand Can’t over provision for extreme cases IT complexity and wasted capacity Page 15
  • 16. Or is it also about this? “I want to try “Departmental“ something now“ Machines Machines Time Time Need to quickly provision new Need to quickly provision new machines for a temporary period of machines for a departmental solution time “Just store “Extend to data in the Cloud“ the Cloud“ With all processing elsewhere Extend existing applications “Migrate existing “New hybrid services“ applications“ Benefits of reduced operational costs On-premise and Cloud aka S+S Page 16
  • 17. Behavioral changes Developers feel empowered Cost of Developers architectural become decisions is entrepreneurs more visible Page 17
  • 18. Agenda Overview • Role Instances • Dynamic environment • Latency & timeouts • Transactions & bandwidth • Data/state • Data sensitivity Summary Page 18
  • 20. Dynamic Environment means… Windows Traditional Azure Control over network topology Admin Limited control over IPs, ports and machines Control Consistent bandwidth with stable latency Latency Variable latency and bandwidth Control over machine Machine names can change identification Identification every time an instance starts Limited control over lifetime, Control over machine lifetime Volatility state becomes transient Page 20
  • 21. Admin control (or lack of it) • Limited access to local environment and state – No admin rights and privileges are available (yet). – No pre-setup or configuration can be done (yet). • Code defines exact set up of roles which provides uniformity across instances Page 21
  • 22. Volatility: Your instances will be stopped Patching React • When an instance goes away, it’s Notification of gone, including its state! Moving instance • Properly handle state so it can lifecycle events be preserved. Failure Page 22
  • 23. Role instance management example Page 23
  • 24. Dynamic networking • Dynamic environment means dynamic networking – Ports changes – IPs change – Cannot rely on node IPs or machine names • The traditional way of networking may no longer be the best fit. – Direct communication is possible – Shift to indirect • Using Windows Azure storage • Using Windows Azure Service Bus Page 24
  • 25. Role Instances Page 25
  • 26. Instances of Role Types “Typical Application” But… Finance Web Message Finance Web Web Role A Message Role A Role A Queue Queue 10 Sec 10 Sec Worker Role A Worker Worker Role A Role A TIP: Queue writes are approx 20/s per writer Page 26
  • 27. Consolidation of Role Types Scalable Message Passing Meta-Message Passing HR Finance Sales HR Finance Sales Message Message Message Message Message Message Meta-queue HR HR Finance Sales Finance Queue Queue Queue Sales 10 10 5 Finance Sec Sec Sec 10 Sec Worker Worker Worker Meta-worker Role Role Role Role Message Type? TIP: Web Roles can communicate direct to Workers TIP: Maximum time to process a Q Item is 2 hours Page 27
  • 28. Elasticity and Roles From this To this Finance Web Web Finance Web Web Web Message Role A Role A Message Role A Role A Role A 10 to 15 Queue minutes Queue 10 Sec 10 Sec Worker Worker Worker Worker Role A Role A Role A Role A Page 28
  • 30. Latency On premises application App Data Service App Request Consistent and accepted latencies Cloud based application App Service Data App Request Increases in quantity and variability of latencies TIP: Expect Web Role to SQL Azure to take about twice as long Page 30
  • 31. Timeout On premises application Try to connect Service App App Request Data Consistent, reliable connectivity and access Connection Yes Continue doing Successful? work Cloud based application Timeouts? No Service App App Request Data No Tried 5 Yes Increased likelihood of timeouts times? Fail Page 31
  • 32. Timeout Retry Code Example Page 32
  • 33. Timeout Retry Code Example Page 33
  • 34. Timeout Retry Code Example TIP: There is a new code library for all this! Page 34
  • 36. Transactions & bandwidth •Bandwidth • Charged for usage • Functionality that was not bandwidth Access Control based may now be effected. Per AC transactions/month • E.g. using Windows Azure Blobs instead of writing to disk Bandwidth Per GB transfer to/from datacenter •Transactions • Charged by quantity Storage • Access types that were not Per GB stored & transactions traditionally on a transaction count may now be effected. Service Bus • E.g. using Access Control Services Per connection/month and Storage SQL Azure Per GB allocated database by day Page 36
  • 37. Data center usage costing comparison Web Role Web Role Transaction Transaction Browser Image Download Blob Browser Image Download Blob Bandwidth Bandwidth Egress Egress TIP: Increasing the size of the VM will increase network throughput Page 37
  • 38. Batch Payloads Frequent message Option 1: passing with a small Serialized # of transactions amount of data can Message Passing Header effect performance and Header Header cost. Header Header Content Content Content Header Total Bytes or Content Overhead Content Content Content Header Message Content Structure Content Header Option 2; Content # of txs TIP: Q items 8KB limit Packaged Message Content TIP: Watch out for data formats! Passing Content Total Bytes TIP: Use storage APIs to group transactions Page 38
  • 39. Batch Queries Single Query Use Batch Query Use Query Worker Query Role A Query Worker Worker Query Query Role Role B Query Worker Query Query Reduction of bandwidth Role C and transactions! Query Worker Query Query Role D Query Worker Role Worker Query Query Role E Query Page 39
  • 40. Be aware of “new costs” e.g. polling • Consider introducing polling a queue every 100ms • 25,920,000 polls/month • £0.0061 per 10,000 storage transactions • Therefore it will cost – £15.81/month • To get an SLA, need two worker roles polling – £31.62/month • Cost of two workers – £0.0728 per hour x 720 x 2 – £104.83/month • Total cost £136.45/month Page 40
  • 41. Be aware of cost 140 million $140 Transactions per Month 120 million $120 Cost per Month 100 million $100 80 million $80 60 million $60 40 million $40 20 million $20 0 1 instance 5 instances 100 ms 100 ms Instances polling storage Page 41
  • 42. Be aware of cost 140 million $140 Transactions per Month 120 million $120 Cost per Month 100 million $100 80 million $80 60 million $60 40 million $40 20 million $20 0 5 instances 5 instances 100 ms 1 second Instances polling storage Page 42
  • 43. Be aware of cost Be wary of frequent transactions with little work being done 140 million $140 Transactions per Month 120 million $120 Cost per Month Unnecessary Cost 100 million $100 80 million $80 60 million $60 40 million $40 20 million $20 0 5 instances Polls which 100 ms found work Instances polling storage Page 43
  • 44. Polling best practices • Poll less often • Synchronize polling with business needs 8am to 12am til 4am 12pm – – every 1 every 100ms minute 4am til 8am – every 10 seconds Page 44
  • 45. Polling best practices cont. Scalable Message Passing Meta-Message Passing HR Finance Sales HR Finance Sales Message Message Message Message Message Message Meta-queue HR HR Finance Sales Finance Queue Queue Queue Sales 10 10 5 Finance Sec Sec Sec 10 Sec Worker Worker Worker Meta-worker Role Role Role Role Message Type? Page 45
  • 46. Data/State Page 46
  • 47. Data/State • Windows Azure instances are highly dynamic – Role instance local data is volatile • Instances are independent – State changes are not reflected in other instances • Therefore – Local instance storage is only useful for temporary data or as a cache – All other data needs to be moved to durable storage Page 47
  • 48. You have many choices for data Relational Database Structured Storage Unstructured Storage NTFS Drive Service Communication Page 48
  • 49. Side by Side Evaluation Single SQL Single Blob Drive Queue Table Azure Database Structured Data Y Y Relational Database Y Server Side Processing Y Direct Access from outside Y Y Y Y Azure Messaging Infrastructure Y Persistent Storage Y Y 1 week Y Y 200 GB/ 1 Size Limit 1 TB 100 TB 100 TB 50 GB (*) TB Page 49
  • 50. Example: Registry/Configuration/User Settings A traditional set of data that is traditionally stored on the local environment is configuration and user settings. Commonly this is stored in the registry, xml or ini files. Options Best Case Usage Blob storage Configuration file that is read only once during app load SQL database Used in environments where a SQL database already exists Windows Azure table User settings that may be changed externally from the environment Page 50
  • 51. Tables for storing Data Why do this? Partition Row Key Data Data Data Data Key Customer ID Description Name Credit Card # Order Total Tracking ID 1 Customer John Smith xxxx-xxxx-xxxx-xxxx Partition A 1 Order – 1 £35.12 Z783lhs 1 Order – 2 £75.00 Z829bhb 2 Customer Bill Johnson xxxx-xxxx-xxxx-xxxx Partition B 2 Order – 3 £10.00 Z778asd 2 Order – 4 £42.00 Z239uhy 3 Customer Travis Jones xxxx-xxxx-xxxx-xxxx Partition C 3 Order – 5 £25.93 Z329nps 3 Order – 6 £80.94 Z440ydd Page 51
  • 52. Selecting keys is … key Consider searching an address book Search By Partition Key Row Key Name Last name + First initial First name + Middle initial Phone number Area code Number Address County + city House number + Street name TIP: Table deletes take time TIP: Replicate data to avoid joins and increase indexes Page 52
  • 53. Data Sensitivity Page 53
  • 54. Segmentation Online Shop Online Shop Product catalogue Purchasing Product Database catalogue Secure Transaction (Service Bus) Page 54
  • 55. Sharding Contact ID Contact ID First Name First Name Cloud Last Name Last Name Shipping Information Shipping Information Customer Credit Card # Social Security # Contact ID Billing Data Customer Credit Card # On Premises Other Information Social Security # On Premises Other Information Page 55
  • 56. Encryption Contact ID Contact ID First Name First Name Cloud Last Name Last Name Shipping Information Shipping Information £!”$&$%!&£% Customer Credit Card # !£$&!%£&%* Social Security # £”$&!%*^(& Billing Data ^$”$&%$”& On Premises Other Information On Premises Page 56
  • 57. Agenda Overview • Role Instances • Dynamic environment • Latency & timeouts • Transactions & bandwidth • Data/state • Data sensitivity Summary Page 57
  • 58. Summary • Windows Web Development best practices apply • But • Cost becomes surprisingly significant in shaping architectures • Plenty of early adopters, therefore – Good Architecture guidance is now appearing – Plenty of detail to dig into Page 58
  • 59. NEXT STEPS For latest slides and all the links http://bit.ly/ericnelson For more resources and information http://bit.ly/startazure As an ISV intending to explore/adopt azure, sign up to http://bit.ly/ukmpr and come along and meet with us http://blogs.msdn.com/b/ukisvdev Eric Nelson | ISV Application Architect | Microsoft UK eric.nelson@microsoft.com | http://bit.ly/ericnelson | http://twitter.com/ericnel Page 59
  • 60. SQL Azure Labs Page 60
  • 61. Demo Page 61