4. AWS Architecture Resource Problem
Scaling!!
● Auto Scaling Benefit
○ Maintain availability
○ Maintain performance
○ Decrease capacity during lulls to
reduce costs
● But
○ Other instance resource is waste
○ EC2 requiring is slow
■ about 1~2min to activate a ec2
■ about 1~2min to update latest
source code
■ about 30s to run health check
7. Container Auto Scaling
Container A
Container B
Container C
Container A
Container B
Container C
Container A
Container C
Machine 1 Machine 2 Machine 3
If Container C causes CPU overload
Then put a new C into Machine 3
8. Service Auto Discovery
Container A
Container B
Container C
Container A
Container B
Container C
Container A
Container C
Machine 1 Machine 2 Machine 3
Service A Service B Service C
Service auto discovery / configuration / load balance
9. Other Benefits of Docker Moby
● Version Control
○ push code and build
○ every commit has its own images
● Lightweight
○ fast activation (~ 10s) and rollback
○ small image
● Isolation
○ applications and resources are isolated and segregated
● Protable
○ Multi-cloud platform support
○ BOSS asked that
11. Kubernetes vs EC2 Container Service
Kubernetes EC2 Container Service
Open Source NO
PaaS Google Compute Engine,
Rackspace, Microsoft Azure,
vSphere, ...
AWS
Community x
Management Kubectl / API AWS CLI / API
Protable Run anywhere AWS only
Service / Discovery built-in Elastic Load Balance
13. Deploy Kubernetes on EC2
● Maintain Kubernetes yourself
○ Install
○ Testing
○ Update
○ and ….
● Handle auto-scale manually
○ remove pods before remove ec2
● Using CI to deploy image
● Set up logging and monitoring policy
● Integrate AWS resource and Kubernetes manually
○ It must be scalable
No, it sucks ...
15. Google Container Engine (GKE)
● Easy
● Full managed
○ even update kubernetes
● Logging and Monitoring support (stackdrive)
● Automatic and configurable cluster scaling
● Google Cloud Platform resource integration
17. TABLEAPP GCP Architecture
Cloud Load
Balancing
Database
Cloud SQL
EastAsia Cluster
Container Engine
TABLEAPP
Cloud CDN
TABLEAPP
Cloudfront CDN
Assets / Images
S3
DNS
Route53
Mail Server
SES
Notification
SNS
18. Architecture inside kubernetes
TABLEAPP Kubernetes Cluster
Front Service
API Service
Manage Service
Front
Front
Manage
Manage
API
CloudSQL Proxy
API
CloudSQL Proxy
API
Cloud Load Balancing
Manage
Cloud Load Balancing
WWW
Cloud Load Balancing
Database
Cloud SQL
Logger Service Logger
Logging
26. Conclusion
● We still remain some service in AWS
○ SES
○ SNS
○ S3
○ Read replica Database
● CloudCDN is really fast
○ very low latency
○ optimize network
○ POP is stable
● Lower price
○ based on new arch, we save 40% cost