Ce diaporama a bien été signalé.
Nous utilisons votre profil LinkedIn et vos données d’activité pour vous proposer des publicités personnalisées et pertinentes. Vous pouvez changer vos préférences de publicités à tout moment.

AWS Canberra WWPS Summit 2013 - AWS for Web Applications

565 vues

Publié le

Highly available and scalable web hosting can be complex and expensive. Learn how Amazon Web Services provides the reliable, scalable, secure, and high performance infrastructure required for web applications while enabling an elastic, scale out and scale down infrastructure to match IT costs in real time as customer traffic fluctuates.

Publié dans : Technologie
  • Soyez le premier à commenter

AWS Canberra WWPS Summit 2013 - AWS for Web Applications

  1. 1. 2013 AWS WWPS SummitCanberra, AustraliaAWS for Web ApplicationsGlenn GoreSr Manager AWS
  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 theincreased load• At peek transfering 48 MB/s to the internet
  3. 3. 2013 AWS WWPS Summit,Canberra – May 23While You’re Scaling• Architect for Failure– Failures do happen– Internet is unpredictable– People are unpredictable• Architect with Security– Security must happen– Security is multi-layered– Security can be automated whileyou scale
  4. 4. 2013 AWS WWPS Summit,Canberra – May 23Why Is Scale Important?SelfHostingWasteCustomerDissatisfactionActual demandPredicted DemandRigid ElasticActual demandAWS
  5. 5. Web Application Scaling
  6. 6. 2013 AWS WWPS Summit,Canberra – May 23Loose 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
  7. 7. 2013 AWS WWPS Summit,Canberra – May 23Allows for Parallel Processing and Failure• Fan out• Use varied instance types• Use varied billing models• Protects against failure• Different workloads can scale independently
  8. 8. 2013 AWS WWPS Summit,Canberra – May 23Allows for Parallel Processing and Failure
  9. 9. 2013 AWS WWPS Summit,Canberra – May 23Go wide, not high!• Build for horizontal scale– Decrease request contention– Reduce capacity planning headaches– Requires a stateless application architecture– Allows for dynamic scalabilityRoute 53 ELB Auto Scale EC2 S3 DynamoDBRDSCloudWatchCloudFormation SQS SNS
  10. 10. But usually some state has to reside somewhereCookies in browserMemory-resident session managerSession databaseFramework-provided session handler
  11. 11. So this store of state needs to be…PerformantScalableReliable
  12. 12. Where should session state reside?Trigger auto-scaling policySession StateServiceNot HereHereState must reside OUTSIDEthe scope of the elements youwish to scale
  13. 13. And what do I build it on?The state service itself mustbe well architected
  14. 14. 2013 AWS WWPS Summit,Canberra – May 23Data Tier ScalingThe bane of the Architect’s existence
  15. 15. 2013 AWS WWPS Summit,Canberra – May 23Vertical 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
  16. 16. 2013 AWS WWPS Summit,Canberra – May 23Master/Slave Horizontal Scaling• Reasonably simple to adapt to• Can now leverage PIOPs• Easy to change instances sizes• Will hit an endpoint eventually
  17. 17. 2013 AWS WWPS Summit,Canberra – May 23Sharded 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
  18. 18. 2013 AWS WWPS Summit,Canberra – May 23Horizontal 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.
  19. 19. 2013 AWS WWPS Summit,Canberra – May 23Petabyte-Scale Data WarehousingFeature DetailsOptimized forDataWarehousingRedshift uses a variety of innovations toobtain very high query performance ondatasets ranging in size from hundreds ofgigabytes 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 Availability Zones.Monitoring Integrated to CloudWatch.Secure Encrypt data in transit and at rest. Can alsobe run in VPC to isolate your datawarehouse cluster.S3 intergration Loads data in parallel to each node fromS3.ElasticMapReduceIntegrates with ERM via Data Pipeline.
  20. 20. 2013 AWS WWPS Summit,Canberra – May 23AWS Application Management SolutionsElastic Beanstalk OpsWorks CloudFormation EC2Convenience ControlHigher-level Services Do it yourself
  21. 21. 2013 AWS WWPS Summit,Canberra – May 23
  22. 22. 2013 AWS WWPS Summit,Canberra – May 23Summary• 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• Loose coupling is good• AWS makes this easier – so your application is not a victim ofits own success
  23. 23. Assessment of research impactRobyn Owens, DVC-ResearchUWA Class2Go and AWSAssociate Professor David Glance
  24. 24. What is a MOOC?• Massive: no restrictions on numbers – from 1 to 160,000• Open: free and open to anyone – no barriers to entry• Online: everything is online, special format videos,automated quizzes, peer assessment• Course: unit of 6 – 10 weeks in duration but can be self-paced
  25. 25. Background• First popularised in 2011 when Stanford ArtificialIntelligence Course is put online and attracts 160,000student enrollments• MOOC platforms developed Coursera from Stanford, edXfrom Harvard/MIT• Sebastian Thrun forms Udacity• Coursera now has 323 courses from 62 universities with2.7m enrollments
  26. 26. Class2Go• Class2Go open source MOOC platform developed by Stanford University(Office of Vice Provost for Online Learning)• UWA is collaborating on development:– Modifying to support different universities– Updating management tools to support Fabric/Cuisine/Boto• Class2Go is being used to host UWA courses for UWA students and generalpublic– 3 Courses so far– 2 more in July (licensed content from Stanford for one of them)– Possibility of Class2Go becoming 2nd Learning Management System at UWA• UWA is assisting Stanford in promoting Class2Go amongst other universities
  27. 27. Class2Go Software Architecture• Load balanced using ELB• Python Django Apache Web Application running on Ubuntu– Hosted on EC2• MySQL database hosted on RDS• Uses video hosted on YouTube and downloaded versions transcoded using ffmpeg– Video and other assets stored on S3• Communicates with utility servers for reports, transcoding, mail-outs using SQS• Mail handled using SES• DNS handled using Route 53• Handling automated marking with Vagrant VMs
  28. 28. Class2Go Architecture
  29. 29. Class2Go Management• Original management via Chef on Opscode• Moved to simpler interface using Python Fabric/Cuisine/Boto– Uses SSH to manage machines– doesn’t require server– Tailored to roles of servers• Creating an App Server instance involves:– Provisioning an EC2 instance with the correct image– Updating Ubuntu– Installing Ubuntu/Python/Django packages– Installing app from github– Installing Apache and configuring– Adding instance to ELB– All run from command line
  30. 30. Class2Go Video Transcoding• Uploaded video is copied to YouTube• Saved to S3• Job placed on SQS for utility server to pick up• Transcoded to smaller size• JPG images created from the video for thumbnails• Results stored in S3
  31. 31. General Observations• Generally it is very straightforward and functionality is reliable andsimple to set up• API is relatively easy to use and makes management of software andsystems environment straightforward• Use CloudWatch for alarms on services and monitor usage etc• Much more cost effective and administratively easier to use thangoing through IT department at the University
  32. 32. 2013 AWS WWPS SummitCanberra, Australia