This document summarizes the migration of a web application called TABLEAPP from AWS to GCP. It describes the original AWS architecture, problems encountered like slow scaling, and goals for the migration like improving performance and reducing costs. It then details experiments with Docker containers and Kubernetes on GCP and AWS. The selected solution deployed Kubernetes on GCP's Container Engine for auto-scaling and easy management. The new GCP architecture integrated Kubernetes, Cloud SQL, Cloud Storage and other services. This resulted in faster deployment times, higher performance, better log collection and a 40% reduction in costs compared to the original AWS architecture.
8. TABLEAPP AWS Architecture
TABLEAPP
Cloudfront CDN
Assets / Images
S3
DNS
Route53
Mail Server
SES
Notification
SNS
Load Balancer
Application
Clusters
EC2 / AutoScale
Database
RDS / HA
9. AWS Architecture Resource Problem
Scaling!!
● Auto Scaling Benefit
○ Maintain availability
○ Maintain performance
○ Decrease capacity during lulls to
reduce costs
● Monthly avg CPU usage under 5%
● 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
12. 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
13. 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
14. 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
16. 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
18. 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 ...
20. 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
22. 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
23. 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
31. 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