Personal Background
16 years of Java development
(Banks, Telcos, Government sector)
20+ years of Linux experience
1 year in
3
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
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
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
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
AWS Elastic Compute Cloud
◂ Base service for IaaS virtualization
◂ Single VM instances
◂ Auto scaling groups
◂ Elastic Load Balancer
11
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
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
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
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
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
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
Place your screenshot here
24
Terraform Modules
define Resources what
you need to provision
use variables for input
reused for different
environments