Se ha denunciado esta presentación.
Utilizamos tu perfil de LinkedIn y tus datos de actividad para personalizar los anuncios y mostrarte publicidad más relevante. Puedes cambiar tus preferencias de publicidad en cualquier momento.

Xây dựng website và ứng dụng mobile đáp ứng 10 triệu người dùng

Điện toán đám mây đem đến nhiều tiện ích cho người dùng, trong đó nổi bật là khả năng mở rộng tài nguyên ứng dụng theo nhu cầu dùng thực. Là một nhà phát triển ứng dụng và muốn sử dụng hạ tầng cloud, bạn có thể có những thắc mắc, băn khoăn và không biết phải bắt đầu từ đâu.

Trong khuôn khổ webinar, Speaker sẽ giới thiệu các best practices để mở rộng tài nguyên hiệu quả cho hệ thống từ 0 tới hàng triệu người dùng. Bạn sẽ được hướng dẫn cách sử dụng kết hợp nhiều dịch vụ của AWS, đưa ra quyết định quan trọng cho thiết kế hệ thống, và mở rộng hệ thống trên nền tảng cloud.

Xây dựng website và ứng dụng mobile đáp ứng 10 triệu người dùng

  1. 1. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. February 7th, 2018 Scaling Up to Your First 10 Million Users
  2. 2. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. LeX Nguyen Territory Manager, Vietnam Amazon Web Services Possess 15 years of leading business development for global technology companies i.e. IBM, Oracle, Microsoft and AWS with working experience in USA, Australia, Singapore and Vietnam. Have been with AWS for 1.4 years as its first local rep to build the foundation for long-term growth in Vietnam. Earned trust from customers across industries to select AWS as their cloud provider i.e. Masan, VietJet Air, VTVGo, VNG Corp, Foody.vn, Tiki.vn, Ticketbox, … Bachelor Degree of Information Systems, Drexel University, USA Today’s Speaker
  3. 3. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. AWS Webinar Series | Register Vietnamese Webinar Session 2 Webinar Topics Date Speaker Webinar Time Best Practices cho việc lưu trữ, backup, và khôi phục dữ liệu trên AWS Wednesday, 7 February 2018 Lex Nguyen, AWS Territory Manager 11am – 12pm (Vietnam Time) Registration QR Code to Register https://aws.amazon.com/events/asean/webinar-series/vietnamese/
  4. 4. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Ask the AWS Experts Our Experts are online to answer any questions you have during the presentation. Ask your questions via the Questions Window on the GoToWebinar Control Panel
  5. 5. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. It’s not the single thing that fixes everything.
  6. 6. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. What do we need first?
  7. 7. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Some basics…
  8. 8. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. AWS Global Infrastructure Region, # of zones Coming Soon!
  9. 9. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. AWS Global Infrastructure
  10. 10. AWS Global Customers
  11. 11. ASEAN startup customers
  12. 12. ASEAN enterprise customers
  13. 13. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. So let’s start from…
  14. 14. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. You
  15. 15. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. 1 User Amazon EC2 instance Elastic IP User Amazon Route 53
  16. 16. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. “We’re gonna need a bigger box” • Simplest approach • Can now leverage PIOPS • High I/O instances • High memory instances • High CPU instances • High storage instances • Easy to change instance sizes • Will hit an endpoint eventually c4.8xlarge m4.2xlarge t2.micro
  17. 17. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. “We’re gonna need a bigger box” • Simplest approach • Can now leverage PIOPS • High I/O instances • High memory instances • High CPU instances • High storage instances • Easy to change instance sizes • Will hit an endpoint eventually c4.8xlarge m4.2xlarge t2.micro
  18. 18. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. 1 User • No failover • No redundancy • Too many eggs in one basket EC2 Instance Elastic IP User Amazon Route 53
  19. 19. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Users > 1 Web Instance Database Instance Elastic IP User Amazon Route 53
  20. 20. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Self-managed Fully managed Amazon EC2 Amazon DynamoDB Amazon RDS Amazon Redshift Database options
  21. 21. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. • MySQL or Postgres compatible • Automatic storage scaling (up to 64 TB) • Up to 15 read-replicas • Continuous (incremental) backups to Amazon S3 • 6-way replication across 3 zones Amazon Aurora
  22. 22. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Users >100 Web instance Elastic IP RDS DB instance User Amazon Route 53
  23. 23. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Users >1,000 Web Instance RDS DB Instance Active (Multi-AZ) Availability Zone Availability Zone Web Instance RDS DB Instance Standby (Multi-AZ) Load balancer User Amazon Route 53
  24. 24. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Elastic Load Balancing • Highly available • 1 - 65535 • Health checks • Session stickiness • Monitoring / logging • Secure sockets layer
  25. 25. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Application Load Balancer • Highly available • 1 - 65535 • Health checks • Session stickiness • Monitoring / logging • Content-based routing • Container-based apps • WebSockets • HTTP/2
  26. 26. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. horizontally vertically
  27. 27. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Users > 100,000s RDS DB Instance Active (Multi-AZ) Availability Zone Availability Zone RDS DB Instance Standby (Multi-AZ) 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 53User
  28. 28. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. What about performance and efficiency?
  29. 29. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. RDS DB Instance Active (Multi-AZ) Availability Zone Load balancer Amazon S3 Amazon CloudFront Amazon Route 53 User Shift some load around Web Instances Availability Zone Web Instances RDS DB Instance Standby (Multi-AZ)
  30. 30. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. RDS DB Instance Active (Multi-AZ) Availability Zone Load balancer Amazon S3 Amazon CloudFront Amazon Route 53 User Shift some load around (single AZ view) Web Instances
  31. 31. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. • Object-based storage • Highly durable • Great for static assets • “Infinitely scalable” • Objects up to 5 TB in size • Optional encryption Amazon Simple Storage Service (S3)
  32. 32. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. • Cache content for faster delivery • Lower load on origin • Dynamic and static content • Streaming video • Custom SSL certificates • Low TTLs (as short as 0 seconds) • Free origin fetches? • Optimized for AWS Amazon CloudFront
  33. 33. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Shift some load around RDS DB Instance Active (Multi-AZ) Availability Zone Load balancer Amazon S3 Amazon CloudFrontUser ElastiCache Web Instances Amazon Route 53
  34. 34. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Amazon CloudFront ResponseTime ServerLoad Response Time Server Load Response Time Server Load No CDN CDN for Static Content CDN for Static & Dynamic Content 0 20 40 60 80 12:00AM 12:00AM 12:00AM 12:00AM 12:00AM 12:00AM 12:00AM 12:00AM 12:00AM 12:00AM 12:00AM 12:00AM 12:00AM 12:00AM VolumeofData Delivered(Gbps)
  35. 35. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Shift some load around RDS DB Instance Active (Multi-AZ) Availability Zone Load balancer Amazon S3 Amazon CloudFront Amazon Route 53 User ElastiCache DynamoDB Web Instances
  36. 36. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Amazon DynamoDB • Managed NoSQL database • Provisioned throughput • Fast, predictable performance • Fully distributed, fault tolerant • JSON support • Items up to 400 KB
  37. 37. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Amazon ElastiCache • Managed Memcached or Redis • Scale from one to many nodes • Self-healing (replaces dead instance) • Single digit ms speeds (usually) • Local to a single AZ for Memcache • Multi-AZ possible with Redis
  38. 38. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Users > 500,000+ Availability Zone Amazon Route 53 User Amazon S3 Amazon CloudFront Availability Zone 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)
  39. 39. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Users > 500,000+ Availability Zone Amazon Route 53 User Amazon S3 Amazon CloudFront Availability Zone 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)
  40. 40. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Users >1 million+ Reaching a million and above is going to require some bit of all the previous things: • Multi-AZ • Elastic Load Balancing between tiers • Auto Scaling • Service oriented architecture (SOA) • Serving content smartly (Amazon S3/CloudFront) • Caching off DB • Moving state off tiers that auto scale
  41. 41. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Users >1 million+ RDS DB Instance Active (Multi-AZ) Availability Zone 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 Lambda
  42. 42. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. The next big steps
  43. 43. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Users >5 million - 10 million Database Issues? How can you solve it? • Federation—splitting into multiple DBs based on function • Sharding—splitting one dataset up across multiple hosts • Moving some functionality to other types of DBs (NoSQL, Graph)
  44. 44. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Database federation • Split up databases by function/purpose • Harder to do cross-function queries • Essentially delays sharding/NoSQL • Won’t help with single huge functions/tables Forums DB Users DB Products DB
  45. 45. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. 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 CBA
  46. 46. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Shifting functionality to NoSQL • Similar in a sense to federation • NoSQL vs. SQL • Leverage managed 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
  47. 47. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. A quick review • Multi-AZ your infrastructure. • Make use of self-scaling services—ELB, Amazon S3, Amazon SNS, Amazon SQS, Amazon SWF, Amazon SES, etc. • Build in redundancy at every level. • Start with SQL. Seriously. • Cache data both inside and outside your infrastructure. • Use automation tools in your infrastructure.
  48. 48. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. A quick review continued • Make sure you have good metrics/monitoring/logging • Split tiers into individual services (SOA) • Use Auto Scaling once you’re ready for it • Don’t reinvent the wheel • Move to NoSQL if and when it makes sense
  49. 49. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. 10+ million users!
  50. 50. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. User >10 million • More fine-tuning of your application • More SOA of features/functionality • Going from Multi-AZ to multi-region • Possibly start to build custom solutions • Deep analysis of your entire stack • Amazon EC2 Container Service • AWS Lambda
  51. 51. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Next steps? Read! aws.amazon.com/documentation aws.amazon.com/architecture Start playing! aws.amazon.com/free/ Get support forums.aws.amazon.com aws.amazon.com/premiumsupport/
  52. 52. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. 10 minutes open Q&A
  53. 53. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Follow Us on Social Media @AmazonWebServices @AWSCloud @AWSCloudSEAsia
  54. 54. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Feedback A feedback form will pop up when you exit the Webinar Console. Please help us to complete in order for us to improve our program.
  55. 55. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Thank You You will receive today’s webinar recording and presentation deck, look out for it in your inbox.

×