3 ms·
Improving GCE boot times with custom images
- orf 9y agotl;dr: not installing dependencies and skipping repetitive, complex and time consuming bootstrapping every time a machine is initially provisioned reduces the time it takes for the server to be operational. Interesting graphs though.
- Cidan 9y agoWe've accomplished much of the same by using GKE and making artifacts out of containers. New instances scale up within a few seconds (and less than a second if we pre-pull the image). It's pretty amazing.
- brianwawok 9y agoCame here to say exactly this. Sadly kube isn't great for highly dynamic loads as you need a bit of time to spin up more nodes. I would just run docker images over custom images. Spin up even faster and a bit easier to build.
- mankash666 9y agoWhat's worked for me: 1. Base OS is core OS or GCE container optimised OS. Striped down, ultra fast, low ram (~200MB) and CPU footprint, ready to run docker containers/images out of the box. 2. Docker Image choice - base Alpine image + {compiled grpc binaries [1] OR compiled C based server for rest APIs [2]} c based rest server size is undeR 8MB, including a couple static assets of~2MB!! Host on gke for faster pull times, or create an instance template for blazing fast boot Times [1] : https://github.com/mankash/grpc-alpine-server https://github.com/mankash/grpc-alpine-server image: https://hub.docker.com/r/mankash/grpc-alpine-server/ https://hub.docker.com/r/mankash/grpc-alpine-server/ [2] : https://github.com/mankash/alpine-kore-build https://github.com/mankash/alpine-kore-build image: https://hub.docker.com/r/mankash/alpine-kore-build/ https://hub.docker.com/r/mankash/alpine-kore-build/