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.

Scaling on AWS

40 views

Published on

Quick introduction to AWS services, possibilities of scaling your applications using EC2, Beanstalk and Lambda.

Published in: Internet
  • Be the first to comment

Scaling on AWS

  1. 1. Scaling on AWS TO INFINITY AND BEYOND
  2. 2. 1. Agenda 1. Background 2. AWS Cloud & EC2 overview 3. Scaling on AWS 4. Infrastructure As Code
  3. 3. Personal Background 16 years of Java development (Banks, Telcos, Government sector) 20+ years of Linux experience 1 year in 3
  4. 4. 4 A family held corporation Retail, Hotels, Restaurants, Real Estate Generating 220,000 jobs Target 2018: $11.9B Thailand, Vietnam, Malaysia, Germany, Italy, Austria, Denmark, others
  5. 5. 5 Project AIP System integration for the new e-commerce platform on AWS Cloud
  6. 6. War Stories ◂ Deploy 72 vCPU machines within minutes when demand arose ◂ Scale out automatically as measured load increases in production ◂ Upgrade a production cluster under load with no downtime ◂ Deploy a full new environment in an hour (network, DBs, ELK, instances, monitoring, etc.) 6
  7. 7. AWS Cloud ◂ “The cloud is just someone else's computer” ◂ Started in 2006 with S3, EC2, SQS ◂ Offers 100+ services now ◂ Layered services (EC2-Beanstalk-Lambda) ◂ “Pay only for what you use” ◂ Free tier! - https://aws.amazon.com/free/ 7
  8. 8. 8
  9. 9. AWS service categories ◂ IaaS ◂ Cloud provides: Hardware + OS ◂ You: patch, upgrade, deploy, monitor, maintain ◂ eg. AWS VPC, EBS, EC2 ◂ PaaS ◂ Cloud provides: Hardware + OS + Framework ◂ You: deploy, monitor ◂ eg. AWS S3, Beanstalk ◂ SaaS ◂ Cloud provides: Hardware + OS + Framework + Application ◂ You: deploy ◂ eg. AWS RDS, Lambda 9
  10. 10. Hosting your application ◂ EC2 (IaaS) ◂ Get a VM, do what you want ◂ Beanstalk (PaaS) ◂ Provide a JAR file ◂ Lambda (SaaS) ◂ Upload a function which gets invoked (eg. bridged to a REST API) 10
  11. 11. AWS Elastic Compute Cloud ◂ Base service for IaaS virtualization ◂ Single VM instances ◂ Auto scaling groups ◂ Elastic Load Balancer 11
  12. 12. EC2 Hello World 1. Choose an AMI 2. Choose an EC2 instance type Choose VPC, Subnet, Security Groups, Elastic IP, EBS disks, Shutdown behaviour, ... <<< these are all optional :) 3. Select SSH key for authentication 4. Launch Deploy and login to a new machine in ~2 minutes with any configuration! 12
  13. 13. Place your screenshot here 13 Choosing an AMI Prepared virtual machine templates
  14. 14. EC2 instance classes General purpose T2 (burstable) or M5 instances Compute optimized C5 instances 3.0 GHz Intel Xeon Platinum processors Run each core at up to 3.5 GHz using Intel Turbo Boost Technology 14 Other instance types Memory optimized GPU optimized Storage optimized
  15. 15. CloudWatch 15
  16. 16. Scaling up 16
  17. 17. Horizontal - Balance load between instances - Achieve high availability (survive hw failures **) - Autoscale based on measured load Horizontal vs Vertical scaling Vertical - Get a bigger machine 17
  18. 18. Scaling *** as a Service ◂ IaaS ◂ eg. AWS EC2 ◂ Scaling is manual ◂ PaaS ◂ eg. AWS Beanstalk ◂ Scaling is provided ◂ SaaS ◂ eg. AWS Lambda, SQS ◂ Scaling is invisible “Standard queues support a nearly unlimited number of transactions per second (TPS) per action.” 18
  19. 19. Scaling with EC2 - manual configuration ◂ EC2 Launch configuration ◂ AMI + startup script (optional) ◂ EC2 Autoscaling group ◂ Min / max instance count ◂ Elastic Load Balancer ◂ Target Groups ◂ CloudWatch metrics alarms ◂ eg. CPU %, network load, etc. ◂ Autoscaling policies ◂ Alarm -> Scale up 1 instance, cooldown 19
  20. 20. Scaling with Beanstalk 20
  21. 21. Place your screenshot here 21 Scaling with Lambda
  22. 22. Infrastructure as Code Provisioning data centers through machine-readable definition files 22
  23. 23. Infrastructure as Code with Terraform ◂ No more manual configuration on UI ◂ No human mistakes ◂ No single heros everyone on team can execute it ◂ Fast, reusable ◂ Auditable (git history) 23
  24. 24. Place your screenshot here 24 Terraform Modules define Resources what you need to provision use variables for input reused for different environments
  25. 25. Input configuration for modules Separate configuration for each environment Define requested state Terraform Environments 25
  26. 26. 26 Terraform Apply Shows result configuration
  27. 27. 27 Thanks! Any questions? You can find me at: ◂ @kjozsa ◂ kristof.jozsa@dpc.hu ◂

×