Diese Präsentation wurde erfolgreich gemeldet.
Wir verwenden Ihre LinkedIn Profilangaben und Informationen zu Ihren Aktivitäten, um Anzeigen zu personalisieren und Ihnen relevantere Inhalte anzuzeigen. Sie können Ihre Anzeigeneinstellungen jederzeit ändern.

AWS Sydney Summit 2013 - Building Web Scale Applications with AWS

1.065 Aufrufe

Veröffentlicht am

Session 3, Presentation 5 from the AWS Sydney Summit

Veröffentlicht in: Technologie
  • Als Erste(r) kommentieren

AWS Sydney Summit 2013 - Building Web Scale Applications with AWS

  1. 1. Glenn GoreBuilding Web-Scale Applications with AWSManager Solutions Architects
  2. 2. I am Barack Obama, Ask me anythingReddit Needed to Scale for a special guest• 2,987,307 pageviews on the day of the IAmA• President Obama’s user page received 428,004pageviews on the day of the IAMA• Added 60 dedicated instance to handle the increasedload• At peek transfering 48 MB/s to the internet
  3. 3. While You Scale• Architect for Failure– Failures do happen• Architect with Security– Security must happen
  4. 4. Why Is Scale Important?SelfHostingWasteCustomerDissatisfactionActual demandPredicted DemandRigid ElasticActual demandAWS
  5. 5. Regions and StorageWhere and What
  6. 6. US-WEST (Oregon)EU-WEST (Ireland)ASIA PAC (Tokyo)ASIA PAC(Singapore)US-WEST (N. California)SOUTH AMERICA (Sao Paulo)US-EAST (Virginia)AWS GovCloud (US)ASIA PAC (Sydney)Regions
  7. 7. US-WEST (Oregon))EU-WEST (Ireland)ASIA PAC (Tokyo)ASIA PAC(Singapore)US-WEST (N. California)SOUTH AMERICA (Sao Paulo)US-EAST (Virginia)AWS GovCloud (US)ASIA PAC (Sydney)Availability Zones
  8. 8. Storage TypesEphemeral Storage• (Almost) every instance has them• Fast• Cheap• VolatileElastic Block Storage• 1GB to 1TB• Snapshot-able• You choose the IOPS• Good for random IO
  9. 9. Storage TypesS3• (Almost) infinitely durable• Infinitely scalable• CloudFront integrationGlacier• (Almost) infinitely durable• Infinitely scalable• Cheapest
  10. 10. Storage TypesDatabase• Readily queryable• Consistency/performance optionsSQS• Logic built-in• Infinitely scalable• Good for small blobs and write/readonce
  11. 11. Application ScalingWide and Proud
  12. 12. Loose coupling sets you free!• The looser theyre coupled, the bigger they scale– Independent components– Design everything as a black box– Decouple interactions– Load-balance clustersController A Controller B Controller CController A Controller B Controller CQ Q QTight CouplingUse Amazon SQS as BuffersLoose Coupling
  13. 13. Allows for Parallel Processing and Failure• Fan out• Use varied instance types• Use varied billing models
  14. 14. Allows for Parallel Processing and Failure
  15. 15. Lets you Auto ScaleAuto ScalingAutomatic resizing of compute clusters based on demandTrigger auto-scaling policyFeature DetailsControl Define minimum and maximum instance poolsizes and when scaling and cool down occurs.Integrated to AmazonCloudWatchUse metrics gathered by CloudWatch to drivescaling.Instance types Run Auto Scaling for On-Demand and SpotInstances. Compatible with VPC.as-create-auto-scaling-group MyGroup--launch-configuration MyConfig--availability-zones eu-west-1a--min-size 4--max-size 200
  16. 16. …and Spread the LoadElastic Load Balancing• Create highly scalable applications• Distribute load across EC2 instancesin multiple availability zonesFeature DetailsAvailable Load balance across instances in multipleAvailability ZonesHealth checks Automatically checks health of instances andtakes them 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 CloudWatch
  17. 17. But usually some state has to reside somewhereCookies in browserMemory-resident session managerSession databaseFramework-provided session handler
  18. 18. So this store of state needs to be…PerformantScalableReliable
  19. 19. Where should session state reside?Trigger auto-scaling policySession StateServiceNot HereHereState must reside OUTSIDEthe scope of the elements youwish to scale
  20. 20. And what do I build it on?The state service itself mustbe well architected
  21. 21. IAM Temporary Security Credentials• Use Cases Identity Federation to AWS APIs Mobile and browser-based applications Consumer applications with unlimited users• Scales to millions of users– No need to create an IAM identity for every user
  22. 22. AWS AccountCredentialsIAM UserTemporarySecurityCredentialsThe IAM Hierarchy of PermissionsPermissions ExampleUnrestricted access to all enabledservices and resourcesAction: *Effect: AllowResource: *(implicit)Access restricted by Group andUser policiesAction: [‘s3:*’, ‘sts:Get*’]Effect: AllowResource: *Access restricted by generatingidentity and further by policiesused to generate tokenAction: [ ‘s3:Get*’ ]Effect: AllowResource:‘arn:aws:s3:::userbucket/*’
  23. 23. AWS Application Management SolutionsElastic Beanstalk OpsWorks CloudFormation EC2Convenience ControlHigher-level Services Do it yourself
  24. 24. Data Tier ScalingThe bane of the Architect’s existence
  25. 25. Vertical Scaling“We’re gonna need a bigger box”• Simplest approach• Can now leverage PIOPs• High I/O instances• Easy to change instance sizes• Will hit an endpoint eventuallyhi1.4xlargem2.4xlargem1.small
  26. 26. Master/Slave Horizontal Scaling• Reasonably simple to adapt to• Can now leverage PIOPs• Easy to change instances sizes• Will hit an endpoint eventually
  27. 27. Sharded Horizontal ScalingHash RingABCD• More complex at the application layer• ORM support can help• No practical limit on scalability• Operation complexity/sophistication• Shard by function or key space• RDBMS or NoSQL
  28. 28. Horizontal Scaling – Fully ManagedDynamoDB• Provisioned throughput NoSQL database• Fast, predictable performance• Fully distributed, fault tolerant architecture• Considerations for non-uniform dataFeature DetailsProvisionedthroughputDial up or down provisioned read/writecapacity.PredictableperformanceAverage single digit millisecond latenciesfrom SSD-backed infrastructure.Strong consistency Be sure you are reading the most up todate values.Fault tolerant Data replicated across Availability Zones.Monitoring Integrated to CloudWatch.Secure Integrates with AWS Identity and AccessManagement (IAM).ElasticMapReduceIntegrates with Elastic MapReduce forcomplex analytics on large datasets.
  29. 29. Petabyte-Scale Data WarehousingFeature DetailsOptimized forDataWarehousingRedshift uses a variety of innovations toobtain very high query performance ondatasets ranging in size from hundredsof gigabytes to a petabyte or more.Scalable Easily scale the number of nodes in yourdata warehouse up or down as yourperformance or capacity needs changeFault tolerant Data replicated across AvailabilityZones.Monitoring Integrated to CloudWatch.Secure Encrypt data in transit and at rest. Canalso be run in VPC to isolate your datawarehouse cluster.S3 intergration Loads data in parallel to each node fromS3.ElasticMapReduceIntegrates with ERM via Data Pipeline.
  30. 30. Summary• Use these techniques (and many, many others) situationally• Awareness of the options is the first step to good design• Scaling is the ability to move the bottlenecks around to theleast expensive part of the architecture• AWS makes this easier – so your application is not a victim ofits own success
  31. 31. Building Web-Scale Applications with AWS

×