AWS Summit Berlin 2013 - Building web scale applications with AWS


Published on

AWS provides a platform that is ideally suited for deploying highly available and reliable systems that can scale with a minimal amount of human interaction. This talk describes a set of architectural patterns that support highly available services that are also scalable, low cost, low latency and allow for agile development practices. We walk through the various architectural decisions taken for each tier and explain our choices for appropriate AWS services and building blocks to ensure the security, scale, availability and reliability of the application.

Published in: Technology
  • Be the first to comment

  • Be the first to like this

No Downloads
Total views
On SlideShare
From Embeds
Number of Embeds
Embeds 0
No embeds

No notes for slide

AWS Summit Berlin 2013 - Building web scale applications with AWS

  1. 1. Ryan Shuttleworth, Technical EvangelistBuilding Web-ScaleApplications with AWS
  2. 2. What’s a web scale application?Three principles to build uponLayering the cake:DataApplicationTotal Jobs Group – their storyWhat are we going to cover?
  3. 3. What do web scaleapps have incommon?
  4. 4. Actual demandPredicted demandCustomerdissatisfactionWasteDemandTimeElastic capacity No need to guess capacity requirements and over-provisionElastic Capacity
  5. 5. Elastic capacityDemandTimeElastic capacity No need to guess capacity requirements and over-provisionElastic Capacity
  6. 6. Built on a global footprint9 Regions25 Availability ZonesContinuous ExpansionBuilt across regional availability zones
  7. 7. Relational Database ServiceDatabase-as-a-ServiceNo need to install or manage database instancesScalable and fault tolerant configurationsDynamoDBProvisioned throughput NoSQL databaseFast, predictable performanceFully distributed, fault tolerant architectureUse RDS for databasesUse DynamoDB forhigh performance key-value DBArchitected using services
  8. 8. Amazon SQSProcessingtask/processingtriggerProcessing resultsAmazon SQSReliable, highly scalable, queue servicefor storing messages as they travelbetween instancesTask ATask B(Auto-scaling)Task C231Simple WorkflowReliably coordinate processing stepsacross applicationsIntegrate AWS and non-AWS resourcesManage distributed state in complexsystemsPush inter-processworkflows into thecloud with SWFReliable messagequeuing withoutadditional softwareArchitected using services
  9. 9. Cloud SearchElastic search engine based uponAmazon A9 search engineFully managed service withsophisticated feature setScales automaticallyDocumentServerResultsSearchServerDon’t install searchsoftware, useCloudSearchProcess large volumesof data cost effectivelywith EMRElastic MapReduceElastic Hadoop clusterIntegrates with S3 & DynamoDBLeverage Hive & Pig analytics scriptsIntegrates with instance types such asspotArchitected using services
  10. 10. Three principles tobuild upon…
  11. 11. Scale1
  12. 12. ScaleElasticity1
  13. 13. ScaleElasticityState Data1
  14. 14. ScaleSecurityElasticityState Data2
  15. 15. ScaleSecurityElasticityState DataInherent2
  16. 16. ScaleSecurityElasticityState DataInherentVPCGroups2
  17. 17. ScaleFailureSecurityElasticityState DataInherentVPCGroups3
  18. 18. ScaleFailureSecurityElasticityState DataInherentVPCExpectedGroups3
  19. 19. ScaleFailureSecurityElasticityState DataInherentVPCExpectedAutomationTestingGroups3
  20. 20. ScaleFailureElasticityState DataExpectedAutomationTestingSecurityInherentVPCGroups
  21. 21. Layering the cake
  22. 22. DataWeb scale dataObject storage
  23. 23. DataYou put it in S3AWS stores with 99.999999999% durabilityHighly scalable web accessto objectsMultiple redundant copiesin a region
  24. 24. What is S3?Highly scalable data storageAccess via APIsA web store,not a file systemFastHighly available & durableEconomicalData
  25. 25. Data
  26. 26. DataWeb scale dataObject storage
  27. 27. DataWeb scale dataObject storageRelational data
  28. 28. DataMaster/Slave Horizontal ScalingReasonably simple to implementLeverage PIOPs for raw performanceEasy to change instances sizesHas an upper limit
  29. 29. DatahashringSharded Horizontal ScalingMore complex at the application layerNo practical limit on scalabilityOperation complexity/sophisticationShard by function or key spaceRDBMS or NoSQLABCD
  30. 30. DataWeb scale dataObject storageRelational data
  31. 31. DataWeb scale dataObject storageRelational dataNoSQL
  32. 32. DataHorizontal Scaling - FullyManagedDynamoDBProvisioned throughput NoSQL databaseFast, predictable performanceFully distributed, fault tolerant architectureConsiderations for non-uniform data
  33. 33. DataDynamoDBProvisioned read/write performance per tablePredictable high performance scaled via console orAPIDial it up
  34. 34. DataLow provisioned throughputTablePartitionSSDRegionIllustrative diagram only
  35. 35. DataIllustrative diagram onlyRegionTablePartitionSSDTablePartitionSSDTablePartitionSSDTablePartitionSSDTablePartitionSSDTablePartitionSSDTablePartitionSSDTablePartitionSSDTablePartitionSSDTablePartitionSSDIncreased provisionedthroughput
  36. 36. DataRegionIllustrative diagram onlyTablePartitionTablePartitionTablePartitionTablePartitionTablePartitionTablePartitionTablePartitionTablePartitionTablePartitionTablePartitionTablePartitionTablePartitionTablePartitionTablePartitionTablePartitionTablePartitionTablePartitionTablePartitionTablePartitionTablePartitionTablePartitionTablePartitionTablePartitionTablePartitionTablePartitionTablePartitionTablePartitionTablePartitionTablePartitionTablePartitionTablePartitionTablePartitionTablePartitionTablePartitionTablePartitionTablePartitionTablePartitionTablePartitionTablePartitionTablePartitionHigh provisioned throughput
  37. 37. DataApplicationLoose coupling sets you free!The looser theyre coupled, the biggerthey scaleIndependent componentsDesign everything as a black boxDecouple interactionsLoad-balance clusters
  38. 38. DataApplicationAmazon SQSProcessingtask/processing triggerProcessing resultsAmazon SQSReliable, highly scalable, queue service for storingmessages as they travel between instances
  39. 39. DataApplicationController A Controller B Controller CTight Coupling
  40. 40. DataApplicationController A Controller B Controller CController A Controller B Controller CTight CouplingLoose CouplingQ Q Q
  41. 41. DataApplicationAuto ScalingAutomatic resizing of compute clusters based on demandTrigger auto-scalingpolicyFeature DetailsControl Define minimum and maximum instance poolsizes and when scaling and cool down occurs.Integrated toAmazonCloudWatchUse metrics gathered by CloudWatch to drivescaling.Instance types Run Auto Scaling for On-Demand and SpotInstances. Compatible with VPC.
  42. 42. DataApplicationWheredoes statereside?
  43. 43. DataApplicationWheredoes statereside?BrowsercookiesFrameworksessionhandlerSessiondatabaseMemorysessionmanager
  44. 44. DataApplicationState store should be:PerformantScalableReliable
  45. 45. DataApplicationTrigger auto-scalingpolicyWhere should state reside?
  46. 46. DataApplicationTrigger auto-scalingpolicyWhere should state reside?Not here
  47. 47. DataApplicationTrigger auto-scalingpolicyWhere should state reside?Not hereSession stateserviceState must reside OUTSIDE thescope of the elements you wish toscale
  48. 48. DataApplicationWhere should state reside?PerformantScalableReliable
  49. 49. DataApplicationLoad BalancingFeature DetailsAvailable Load balance across instances in multiple AvailabilityZonesHealth checks Automatically checks health of instances and takesthem in or out of serviceSession stickiness Route requests to the same instanceSecure sockets layer Supports SSL offload from web and applicationservers with flexible cipher supportMonitoring Publishes metrics to CloudWatchElastic Load BalancingCreate highly scalable applicationsDistribute load across EC2 instancesin multiple availability zones
  50. 50. DataApplicationLoad BalancingDistributionRoute53RegionARoute53RegionBRequestRoute53Global DNS service
  51. 51. DataApplicationLoad BalancingDistributionRoute53RegionARoute53RegionB16ms 92msRequestRoute53Global DNS service
  52. 52. DataApplicationLoad BalancingDistributionRoute53RegionARoute53RegionB16ms 92msRequestRoute53Global DNS service
  53. 53. DataApplicationLoad BalancingDistributionRoute53RegionARoute53RegionB16ms 92msRequestRegion A DNS entryRoute53Global DNS service
  54. 54. DataApplicationLoad BalancingDistributionLondonParisNYServed from S3/images/*3Served from EC2*.php2Single CNAMEwww.mysite.com1CloudFrontWorld-wide content distributionnetwork
  55. 55. DataApplicationLoad BalancingDistributionResponseTimeServerLoadResponseTimeServerLoadResponseTimeServerLoadNo CDN CDN forStaticContentCDN forStatic &DynamicContentCloudFrontWorld-wide content distributionnetwork
  56. 56. DataApplicationLoad BalancingDistributionManagement
  57. 57. DataApplicationLoad BalancingDistributionManagement10 instancesmanageable
  58. 58. DataApplicationLoad BalancingDistributionManagement100 instancesat a push
  59. 59. DataApplicationLoad BalancingDistributionManagement1,000 instancesnot a chance
  60. 60. DataApplicationLoad BalancingDistributionManagementAutomation &managementWeb scale enabler
  61. 61. OpsWorks Elastic BeanstalkCloudFormation EC2DataApplicationLoad BalancingDistributionManagement
  62. 62. OpsWorks Elastic BeanstalkCloudFormation EC2controlconvenienceDataApplicationLoad BalancingDistributionManagement
  63. 63. SummaryUse these techniques (and many others) as appropriateAwareness of the options is the first step to good designScaling is the ability to move the bottlenecks around tothe least expensive part of the architectureAWS makes this easier – so your application is not avictim of its own successSummary
  64. 64. Thank you