Load Test on Elastic Container Service ● Easy to setup locust cluster ○ Consists of 2 Tasks ■ 1 master ■ Multiple slave ○ Manage instances using Spot Fleet ■ Cheap but scalable
nginx-build on CircleCI ● Easy to build custom nginx build ○ Bundle custom modules such as ngx_mruby ○ Patch for security issue ■ Update only openssl but not nginx
What problem do we have to resolve? ● Performance ○ Latency from Japan and USA (400ms/req) ○ Needed more powerful dyno ● Security ○ At least we need fixed outbound IP address ● Cost
Similarity to Heroku ● Deploy via git ● Buildpack ● CLI sub command ○ Ex: heroku conifg:set <-> deis config:set ● Interactive console not yet supported ○ Create own tool using Docker API
Elastic Load Balancing Router Controller Builder Applications etcd AZ #1 AZ #2 Production Cluster 1st Gen. PosggreSQL On Amazon RDS Docker Registry On Amazon S3
Elastic Load Balancing Router/Applications AZ #1 AZ #2 Controller /Builder etcd Production Cluster 2nd Gen. PosggreSQL On Amazon RDS Docker Registry On Amazon S3
Fleet is too simple ● Fleet is not resource aware scheduler ● Fleet deploy new container in instance which has the least containers ● Sometimes make it unbalanced workload of clusters
Elastic Load Balancing Router/Apps (Shared) AZ #1 AZ #2 Controller /Builder High-Load Apps (Dedicated) etcd Production Cluster 3rd Gen PosggreSQL On Amazon RDS Docker Registry On Amazon S3
Tag based Deployment ● Tag = Fleet metadata ● Set fleet metadata by cloud-init #cloud-config Coreos: ... fleet: public-ip: $private_ipv4 metadata: dataPlane=true,high=true #cloud-config Coreos: ... fleet: public-ip: $private_ipv4 metadata: dataPlane=true,routerMesh=true,high=false For dedicated For shared
Blue Green Deployment 1. Start new containers 2. Notify to etcd 3. Update nginx.conf by confd 4. Reload router (nginx) 5. Update routing 6. Destroy old containers
Fleet is too simple (again) ● Fleet is not resource aware scheduler ● Fleet deploy new container in instance which has the least containers ● Sometimes make it unbalanced workload of clusters