Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

Build A Website on AWS for Your First 10 Million Users

Join this workshop to understand the core concepts of “Cloud Computing” and how businesses around the world are running the infrastructure that supports their websites to lower costs, improve time-to-market, and enable rapid scalability matching resource to demands of users. Whether you are an enterprise looking for IT innovation, agility and resiliency or small and medium business who wants to accelerate growth without a big upfront investment in cash or time for technology, the AWS Cloud provides a complete set of services at zero upfront costs which are available with a few clicks and within minutes.

Related Books

Free with a 30 day trial from Scribd

See all

Related Audiobooks

Free with a 30 day trial from Scribd

See all

Build A Website on AWS for Your First 10 Million Users

  1. 1. Your First 10 Million Users with Amazon Web Services Markku Lepistö Technology Evangelist @markkulepisto
  2. 2. So how do we get to scale?
  3. 3. a lot of things to read
  4. 4. a lot of things to read not where we want to start
  5. 5. Auto Scaling is an excellent destination. There’s lots we can do in the mean time.
  6. 6. What do we need first?
  7. 7. Some basics…
  8. 8. So let’s start from day one, user one (you)
  9. 9. Regions and Availability Zones Concept
  10. 10. TECHNICAL & BUSINESS SUPPORT Account Manageme nt Support Profession al Services Training & Certificatio n Security & Billing Reports Partner Ecosyste m Solutions Architect s ENTERPRISE APPS Virtual Desktops Sharing & Collaboration Corporate Email Backup Regions Availability Zones Points of Presence INFRASTRUCTURE CORE SERVICES Compute VMs, Auto-scaling, Load Balancing, Containers, Cloud functions Storage Object, Blocks, File, Archival, Import/Export Databases Relational, NoSQL, Caching, Migration Networkin g VPC, DX, DNS CDN HYBRID ARCHITECTURE Data Backups Integrated App Deployment s Direct Connect Identity Federation Integrated Resource Manageme nt Integrated Networkin g Access Control Identity Management Key Management & Storage Monitoring & Logs Assessment and reporting Resource & Usage Auditing SECURITY & COMPLIANCE Configuration Compliance Web application firewall Busines s Apps Business Intelligence Databases DevOps Tools NetworkingSecurity Storage IoT Rules Engine Device Shadows Device SDKs Registry Device Gateway DEVELOPMENT & OPERATIONSMOBILE SERVICESAPP SERVICESANALYTICS Data Warehousing Hadoop/ Spark Streaming Data Collection Machine Learning Elastic Search Queuing & Notifications Workflow Search Email Transcoding One-click App Deployment Identity Sync Mobile App Testing Push Notifications DevOps Resource Management Application Lifecycle Management Containers Triggers Resource Templates API Gateway Streaming Data Analysis Business Intelligence Mobile Analytics Services Provided Single Integrated Console MARKETPLACE
  11. 11. EC2 instance Elastic IP Amazon Route 53 User
  12. 12. c3.8xlarge m3.2xlarge t2.micro
  13. 13. •  Will hit an endpoint eventually c3.8xlarge m3.2xlarge t2.micro
  14. 14. EC2 Instance Elastic IP Amazon Route 53 User
  15. 15. •  No failover •  No redundancy •  Too many eggs in one basket EC2 Instance Elastic IP Amazon Route 53 User
  16. 16. Web Instance Database Instance Elastic IP Amazon Route 53 User
  17. 17. Self-managed Fully managed Database server on Amazon EC2 Your choice of database running on Amazon EC2 Bring Your Own License (BYOL) Amazon DynamoDB Managed NoSQL database service using SSD storage Seamless scalability Zero administration Amazon RDS Aurora, Microsoft SQL, Oracle, MySQL or PostgreSQL as a managed service BYOL or License Included Amazon Redshift Massively parallel, petabyte-scale data warehouse service Fast, powerful, and easy to scale Database options
  18. 18. But how do I choose what DB technology I need? SQL? NoSQL?
  19. 19. If you do NEED NoSQL Consider Amazon DynamoDB
  20. 20. Web instance Elastic IP RDS DB instance Amazon Route 53 User
  21. 21. Web Instance RDS DB Instance Active (Multi-AZ) Availability Zone Availability Zone Web Instance RDS DB Instance Standby (Multi-AZ) Elastic Load Balancer Amazon Route 53 User
  22. 22. •  Create highly scalable applications •  Distribute load across EC2 instances in multiple Availability Zones Feature   Details   Available   Load  balances  across  instances  in  mul1ple   Availability  Zones   Health  checks   Automa1cally  checks  health  of  instances  and   takes  them  in  or  out  of  service   Session  s6ckiness   Routes  requests  to  the  same  instance   Secure  sockets  layer   Supports  SSL  offload  from  web  and  applica1on   servers  with  flexible  cipher  support   Monitoring   Publishes  metrics  to  CloudWatch  and  can  get   logs  of  requests  processed   Elastic Load Balancer Elastic Load Balancer
  23. 23. Scaling this horizontally and vertically will get us pretty far ( 10k -100k’s of users)
  24. 24. User 10k-100k’s RDS DB Instance Active (Multi-AZ) Availability Zone Availability Zone RDS DB Instance Standby (Multi-AZ) Elastic Load Balancer RDS DB Instance Read Replica RDS DB Instance Read Replica RDS DB Instance Read Replica RDS DB Instance Read Replica Web Instance Web Instance Web Instance Web Instance Web Instance Web Instance Web Instance Web Instance Amazon Route 53 User
  25. 25. This will take us pretty far, but we care about performance and efficiency, so let’s improve further
  26. 26. Web Instance RDS DB Instance Active (Multi-AZ) Availability Zone Elastic Load Balancer Amazon Route 53 User
  27. 27. Web Instance RDS DB Instance Active (Multi-AZ) Availability Zone Elastic Load Balancer Amazon S3 Amazon Cloudfront Amazon Route 53 User •  Move static content from the web instance to Amazon S3 and Amazon CloudFront
  28. 28. Amazon Simple Storage Service (S3) is cloud storage for the Internet: Amazon S3
  29. 29. CloudFront Amazon CloudFront is a web service for scalable content delivery: •  Cache static content at the edge for faster delivery •  Helps lower load on origin infrastructure •  Dynamic and static content •  Streaming video •  Custom SSL certificates •  Low TTLs (as short as 0 seconds) •  Lower costs for origin fetches (between Amazon S3 / Amazon EC2 and CloudFront) •  Optimized to work with Amazon EC2, Amazon S3, Elastic Load Balancing, and Amazon Route 53 Response  Time   Server  Load   Response   Time   Server   Load   Response   Time   Server   Load   No  CDN   CDN  for  Sta1c   Content   CDN  for  Sta1c  &   Dynamic  Content   0   20   40   60   80   8:00   AM   9:00   AM   10:00   AM   11:00   AM   12:00   PM   1:00   PM   2:00   PM   3:00   PM   4:00   PM   5:00   PM   6:00   PM   7:00   PM   8:00   PM   9:00   PM   VolumeofData Delivered(Gbps)
  30. 30. Web Instance RDS DB Instance Active (Multi-AZ) Availability Zone Elastic Load Balancer Amazon S3 Amazon Cloudfront Amazon Route 53 User
  31. 31. •  Move session/state and DB caching to Amazon ElastiCache or Amazon DynamoDB Web Instance RDS DB Instance Active (Multi-AZ) Availability Zone Elastic Load Balancer Amazon S3 Amazon Cloudfront Amazon Route 53 User ElastiCache DynamoDB
  32. 32. •  Managed, provisioned throughput NoSQL database •  Fast, predictable performance •  Fully distributed, fault tolerant architecture •  JSON support (NEW) •  Items up to 400 KB (NEW) Feature   Details   Provisioned   throughput   Dial  up  or  down  provisioned   read/write  capacity   Predictable   performance   Average  single  digit  millisecond   latencies  from  SSD-­‐backed   infrastructure   Strong   consistency   Be  sure  you  are  reading  the   most  up  to  date  values   Fault  tolerant   Data  replicated  across   Availability  Zones   Monitoring   Integrated  with  Amazon   CloudWatch   Secure   Integrates  with  AWS  Iden1ty   and  Access  Management  (IAM)  
  33. 33. •  Move dynamic content from the ELB to Amazon CloudFront Web Instance RDS DB Instance Active (Multi-AZ) Availability Zone Elastic Load Balancer Amazon S3 Amazon Cloudfront Amazon Route 53 User ElastiCache DynamoDB
  34. 34. •  Move dynamic content from the ELB to Amazon CloudFront Web Instance RDS DB Instance Active (Multi-AZ) Availability Zone Elastic Load Balancer Amazon S3 Amazon Cloudfront Amazon Route 53 User ElastiCache DynamoDB
  35. 35. Now that our web tier is much more lightweight, we can revisit the beginning of our talk…
  36. 36. Auto Scaling!
  37. 37. Automatic resizing of compute clusters based on demand Feature   Details   Control   Define  minimum  and  maximum  instance  pool   sizes  and  when  scaling  and  cool  down  occurs.   Integrated  to  Amazon   CloudWatch   Use  metrics  gathered  by  CloudWatch  to  drive   scaling.   Instance  types   Run  Auto  Scaling  for  on-­‐demand  and  Spot   Instances.  Compa1ble  with  VPC.   aws autoscaling create-auto-scaling-group --auto-scaling-group-name MyGroup --launch-configuration-name MyConfig --min-size 4 --max-size 200 --availability-zones us-west-2c, us-west-2b Auto Scaling Trigger auto-scaling policy Amazon CloudWatch
  38. 38. Sunday Monday Tuesday Wednesday Thursday Friday Saturday Typical  weekly  traffic  to  Amazon.com  
  39. 39. Sunday Monday Tuesday Wednesday Thursday Friday Saturday Typical  weekly  traffic  to  Amazon.com   Provisioned capacity
  40. 40. November
  41. 41. Provisioned capacity November
  42. 42. 76% 24% Provisioned capacity November
  43. 43. November
  44. 44. Auto Scaling lets you do this!
  45. 45. Availability Zone Amazon Route 53 User Amazon S3 Amazon Cloudfront Availability Zone Elastic Load Balancer DynamoDB RDS DB Instance Read Replica Web Instance Web Instance Web Instance ElastiCache RDS DB Instance Read Replica Web Instance Web Instance Web Instance ElastiCacheRDS DB Instance Standby (Multi-AZ) RDS DB Instance Active (Multi-AZ)
  46. 46. AWS application management solutions Convenience Control Higher-level services Do it yourself AWS Elastic Beanstalk AWS OpsWorks AWS CloudFormation Amazon EC2
  47. 47. Deploying a Web App with AWS Elastic Beanstalk
  48. 48. Host Level Metrics Aggregate Level Metrics
  49. 49. Centralized Log Analysis External Site Monitoring
  50. 50. There are further improvements to be made by breaking apart our web/app layer
  51. 51. Controller  A   Controller  B   Controller  A   Controller  B   Q   Q   Tight  coupling   Use  Amazon  SQS  as  buffers   Loose  coupling  
  52. 52. RDS DB Instance Active (Multi-AZ) Availability Zone Elastic Load Balancer RDS DB Instance Read Replica RDS DB Instance Read Replica Web Instance Web Instance Web Instance Web Instance Amazon Route 53 User Amazon S3 Amazon Cloudfront DynamoDB Amazon SQS ElastiCache Worker Instance Worker Instance Amazon CloudWatch Internal App Instance Internal App Instance Amazon SES
  53. 53. The next big steps
  54. 54. •  Split up databases by function/ purpose •  Harder to do cross-function queries •  Essentially delaying the need for something like sharding/ NoSQL until much further down the line •  Won’t help with single huge functions/tables ForumsDB UsersDB ProductsDB
  55. 55. Sharded horizontal scaling •  More complex at the application layer •  No practical limit on scalability •  Operation complexity/ sophistication •  Shard by function or key space •  RDBMS or NoSQL User ShardID 002345 A 002346 B 002347 C 002348 B 002349 A Shard C Shard B Shard A
  56. 56. Shifting functionality to NoSQL •  Leverage hosted services like DynamoDB •  Some use cases: –  Leaderboards/scoring –  Rapid ingest of clickstream/log data –  Temporary data needs (cart data) –  “Hot” tables –  Metadata/lookup tables DynamoDB
  57. 57. A quick review
  58. 58. Putting all this together means we should now easily be able to handle 10+ million users!
  59. 59. To infinity…..
  60. 60. Expand Your Cloud Skills with AWS Certification aws.amazon.com/certification Validate your proven technical expertise with the AWS platform and gain recognition for your skills Online videos and labs aws.amazon.com/training/ self-paced-labs Start working with an AWS service in minutes with free online instructional videos and labs aws.amazon.com/training Instructor-led courses Learn how to design, deploy, and operate highly available, cost-effective, and secure applications on AWS
  61. 61. Thank you! @AWSCloudSEAsia Markku Lepistö Technology Evangelist APAC
  62. 62. THANKS FOR LISTENING!

×