AWS 201 - A Walk through the AWS Cloud: App Hosting on AWS - Games, Apps and Mobile, Markku Lepisto

2,754 views
2,543 views

Published on

Playfish, Gumi, and Halfbrick are three of many gaming companies on AWS. Pinterest, Netflix and Flipboard host web and mobile applications using the AWS Cloud. What are the best practices to build an application to take advantage of the benefits of AWS? Learn about these approaches and how customers have built highly scalable, durable and reliable infrastructures to host their internet-facing businesses on AWS. Attend this complimentary webinar to learn more.

Published in: Technology
0 Comments
11 Likes
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total views
2,754
On SlideShare
0
From Embeds
0
Number of Embeds
3
Actions
Shares
0
Downloads
0
Comments
0
Likes
11
Embeds 0
No embeds

No notes for slide

AWS 201 - A Walk through the AWS Cloud: App Hosting on AWS - Games, Apps and Mobile, Markku Lepisto

  1. 1. A Walk through the AWS Cloud – App hosting on AWS Markku Lepistö - Technology Evangelist @markkulepisto
  2. 2. 1. FOCUS 2. AUTOMATE & SCALE 3. DESIGN FOR FAILURE 4. LOOSELY COUPLE 5. ITERATE – DRIVEN BY DATA
  3. 3. #1 FOCUS ●○○○○
  4. 4. Outsource the Undifferentiated Heavy Lifting
  5. 5. Your Business 70% On-Premise Infrastructure 30% Managing All of the “Undifferentiated Heavy Lifting” Simplify and Outsource with Services
  6. 6. AWS Cloud-Based Infrastructure Your Business More Time to Focus on Your Business Configuring Your Cloud Assets 70% 30%70% On-Premise Infrastructure 30% Managing All of the “Undifferentiated Heavy Lifting” Simplify and Outsource with Services
  7. 7. #2 AUTOMATE & SCALE ●●○○○
  8. 8. AMAZON EC2 ELASTIC COMPUTE CLOUD
  9. 9. AMI YOUR CODE CORE SERVICES 3rd PARTY LIBRARIES OPERATING SYSTEM Pre-baked AMI
  10. 10. AMIAMIAMI YOUR CODE CORE SERVICES 3rd PARTY LIBRARIES OPERATING SYSTEM YOUR CODE CORE SERVICES 3rd PARTY LIBRARIES OPERATING SYSTEM YOUR CODE CORE SERVICES 3rd PARTY LIBRARIES OPERATING SYSTEM Pre-baked AMI JeOS + Orchestration
  11. 11. Vertical Scaling From $0.02/hr Basic unit of compute capacity Range of CPU, memory & local disk options 17 Instance types available, from micro through cluster compute to SSD backed Scale up with Elastic Compute Cloud (EC2) Optimize Instance Types – Resources vs Cost
  12. 12. Trigger auto- scaling policy as-create-auto-scaling-group MyGroup --launch-configuration MyConfig --availability-zones eu-west-1a --min-size 4 --max-size 200 Auto Scaling Scale out compute groups based on metrics or timers Scale Horizontally
  13. 13. Legacy Servers are Pets with High Identities
  14. 14. Cloud instances are Cattle Instance ID Tag
  15. 15. ELASTIC LOAD BALANCING LOAD BALANCE FROM DAY 1 (even to a single dev/test instance)
  16. 16. 6 am
  17. 17. 10 am
  18. 18. 10 am
  19. 19. 10 am
  20. 20. 7 pm
  21. 21. 7 pm
  22. 22. 7 pm
  23. 23. 503 Service Temporarily Unavailable The server is temporarily unable to service your request due to maintenance downtime or capacity problems. Please try again later.
  24. 24. 503 Service Temporarily Unavailable The server is temporarily unable to service your request due to maintenance downtime or capacity problems. Please try again later.
  25. 25. Less instances at night Peak traffic $52 / hr Night traffic $15 / hr 71% savings!
  26. 26. Relational Database Service Database-as-a-Service No need to install or manage database instances Scalable and fault tolerant configurations MySQL, Oracle and SQL Server DynamoDB Provisioned throughput NoSQL database Fast, predictable performance Fully distributed, fault tolerant architecture Use RDS for databases Use DynamoDB for high performance key-value DB SQL and NoSQL Services
  27. 27. Problem: Outgrew existing IT environment Solution: AWS’s elasticity made it easy to respond to demand peaks and saved money during off peak times Business Benefits: Scaled to handle 10 million visitors per day Reduced time-to-market and dev time Amazon RDS Gumi scaled to millions of users
  28. 28. Our first Facebook game, Fruit Ninja Frenzy, jumped from 1 million to 8 million active monthly users in only two weeks…. We switched to storing our game data in DynamoDB.. We love that DynamoDB handles so much of the management for us, freeing us to focus on development. -Glen Arrowsmith, Systems Architect, Halfbrick Studios Amazon DynamoDB Halfbrick scaled to millions of users
  29. 29. AMAZON ELASTICACHE MEMCACHED COMPATIBLE IN-MEMORY CACHE
  30. 30. AWS Application Management Services Elastic Beanstalk OpsWorks CloudFormation EC2 Convenience Control Higher-level Services Do it yourself
  31. 31. AWS ELASTIC BEANSTALK FOCUS ON APP DEVELOPMENT
  32. 32. Quickly deploy and manage apps in AWS… Elastic Beanstalk CloudFormationTools
  33. 33. Application package is deployed into Beanstalk Elastic Beanstalk CloudFormationTools
  34. 34. …into a range of containers Elastic Beanstalk CloudFormationTools .Net PHP Java Python Ruby Node.js
  35. 35. User Application Application Service HTTP Service Language Interpreter Operating System Host Which creates the container in EC2 Elastic Beanstalk CloudFormationTools
  36. 36. Beanstalk takes care of the environment… Elastic Beanstalk CloudFormationTools
  37. 37. …adding Elastic Load Balancer… Elastic Beanstalk CloudFormationTools
  38. 38. …Auto Scaling groups Elastic Beanstalk CloudFormationTools
  39. 39. …and launching instances Elastic Beanstalk CloudFormationTools
  40. 40. …all wired into the Beanstalk framework Elastic Beanstalk CloudFormationTools
  41. 41. …and published under a CNAME Elastic Beanstalk CloudFormationTools
  42. 42. …with logs and app versions held in S3 Elastic Beanstalk CloudFormationTools
  43. 43. Package up as normal… Elastic Beanstalk CloudFormationTools Java .war file Microsoft Web Deploy package PHP .zip file Python .zip file Git integrationIDE plugins
  44. 44. AWS CLOUDFORMATION INFRASTRUCTURE AS CODE
  45. 45. { "Description" : "Create a Replicated RDS Database", "Resources" : { "MyDB" : { "Type" : "AWS::RDS::DBInstance", "Properties" : { "AllocatedStorage" : "500", "DBInstanceClass" : "db.m1.small", "Engine" : "MySQL", "EngineVersion" : "5.5", "MasterUsername" : "MyName", "MasterUserPassword" : "MyPassword” "MultiAZ" : “True” } } } }
  46. 46. NASA TV & Curiosity Route 53 DNS Multi-region & AZ Elastic Loadbalancing Amazon Live Streaming Cloud Front Cloud Formation
  47. 47. NASA TV & Curiosity Route 53 DNS Multi-region & AZ Elastic Loadbalancing Amazon Live Streaming Cloud Front Cloud FormationTemplate ELBs to front secondary cache ~100 Nginx secondary cache servers 2-3 Nginx mid-tier cache servers Stack CloudFormation template defined video caching infrastructure
  48. 48. NASA TV & Curiosity Route 53 DNS Multi-region & AZ Elastic Loadbalancing Amazon Live Streaming Cloud Front Cloud Formation Availability Zone As demand increased new stacks added to an availability zone using template One-click complex rollout
  49. 49. AMAZON ROUTE 53 DOMAIN NAME SERVICE
  50. 50. Multi-Region Latency Based Routing Route 53 now powering CloudFront, EC2 and ELB Application instances in several AWS Regions Users automatically routed to lowest latency Region
  51. 51. London Paris NY Served from S3 /images/* 3 Served from EC2 *.php 2 Single CNAME www.mysite.com 1 Amazon CloudFront World-wide content distribution network Easily distribute content to end users with low latency, high data transfer speeds, and no commitments. Optimize Service Delivery
  52. 52. ResponseTime ServerLoad ResponseTime Server Load ResponseTime Server Load No CDN CDN for Static Content CDN for Static & Dynamic Content Offload Scale Down Offload Backend Systems
  53. 53. Go Global in Minutes 9 Regions, 42 Edge Locations
  54. 54. #3 DESIGN FOR FAILURE ●●●○○
  55. 55. YOUR GOAL Applications should continue to function even if the underlying physical hardware fails or is removed or replaced
  56. 56. Avoid single points of failure. Assume everything fails, and design backwards.
  57. 57. Avoid single points of failure. Assume everything fails, and design backwards.
  58. 58. MULTI-AZ DEPLOYMENT
  59. 59. AWS BUILDING BLOCKS Inherently Fault-Tolerant Services Fault-Tolerant with the right architecture  Amazon S3  Amazon SimpleDB  Amazon DynamoDB  Amazon CloudFront  Amazon SWF  Amazon SQS  Amazon SNS  Amazon SES  Amazon Route53  Elastic Load Balancing  AWS IAM  AWS Elastic Beanstalk  Amazon ElastiCache  Amazon EMR  Amazon CloudSearch  Amazon Redshift  Amazon EC2  Amazon EBS  Amazon RDS  Amazon VPC
  60. 60. Game Day – Introduce Failures
  61. 61. #4 LOOSELY COUPLE ●●●●○
  62. 62. BUILD LOOSELY COUPLED SYSTEMS The looser the are coupled, the bigger they scale
  63. 63. Create independent Components
  64. 64. Create independent Components Design everything as a Black Box
  65. 65. Create independent Components Design everything as a Black Box Think in terms of Services
  66. 66. Latency Monkey – Slow down inter-service responses
  67. 67. RECEIVE TRANSCODE & PUBLISH
  68. 68. RECEIVE TRANSCODE & PUBLISH QUEUE
  69. 69. Amazon SQS Processing task/processing trigger Processing results Amazon SQS Reliable, highly scalable, queue service for storing messages as they travel between instances Task A Task B (Auto-scaling) Task C 2 3 1 Simple Workflow Reliably coordinate processing steps across applications Integrate AWS and non-AWS resources Manage distributed state in complex systems Push inter-process workflows into the cloud with SWF Reliable message queuing without additional software Queue and Workflow Services
  70. 70. #5 ITERATE - DRIVEN BY DATA ●●●●●
  71. 71. Elastic MapReduce Managed, elastic Hadoop cluster Integrates with S3 & DynamoDB Leverage Hive, Pig, HBase, R, Mahout Feature Details Scalable Use as many or as few compute instances running Hadoop as you want. Modify the number of instances while your job flow is running Integrated with other services Works seamlessly with S3 as origin and output. Integrates with DynamoDB Comprehensive Supports languages such as Hive and Pig for defining analytics, and allows complex definitions in Cascading, Java, Ruby, Perl, Python, PHP, R, or C++ Cost effective Works with Spot instance types Monitoring Monitor job flows from with the management console. Ganglia integrated Get Insights with Elastic MapReduce
  72. 72. Visualize & Analyze – Tableau examples
  73. 73. CLOUDFORMATION TEMPLATE Iterate & Improve
  74. 74. MediaMolecule uses AWS for Application Development Increased flexibility to run multiple environments Rapid dev and test of a new infrastructure WEALSO LOVEDTHE FLEXIBILITY THATAWS ALLOWED US, WHEN SPINNING UPSMALLER TEST ENVIRONMENTS, FOR BETATRIALS, QA, LOCALIZATION, AND DURING DEVELOPMENT -ALEX EVANS, CTO
  75. 75. aws.amazon.com get started with the free tier
  76. 76. Thank you Markku Lepistö - Technology Evangelist @markkulepisto
  77. 77. POLL
  78. 78. Your feedback is important Please complete the Survey! What’s good, what’s not What you want to see at these events What you want AWS to deliver for you

×