Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

gcloud preview app deploy process takes ~8 minutes, is this normal?

Trying out new flexible app engine runtime. In this case a custom Ruby on Rails runtime based on the google provided ruby runtime.

When firing of gcloud preview app deploy the whole process takes ~8 minutes, most of which is "updating service". Is this normal? And more importantly, how can I speed it up?

Regards,

Ward

like image 307
Ward Bekker Avatar asked Jun 07 '16 15:06

Ward Bekker


People also ask

What does gcloud app deploy do?

Deploy your application to App Engine using the gcloud app deploy command. This command automatically builds a container image by using the Cloud Build service and then deploys that image to the App Engine flexible environment. The container will include any local modifications that you've made to the runtime image.


1 Answers

Yes, that is totally normal. Most of the deployment steps happen away from your computer and are independent of your codebase size, so there's not a lot you can do to speed up the process.

Various steps that are involved in deploying an app on App Engine can be categorized as follows:

  1. Gather info from app.yaml to understand overall deployment
  2. Collect code and use the docker image specified in app.yaml to build a docker image with your code
  3. Provision Compute Instances, networking/firewall rules, install docker related tools on instance, push docker image to instance and start it
  4. Make sure all deployments were successful, start health-checks and if required, transfer/balance out the load.

The only process which takes most of time is the last part where it does all the necessary checks to make sure deployment was successful and start ingesting traffic. Depending upon your code size (uploading code to create container) and requirements for resources (provisioning custom resources), step 2 and 3 might take a bit more time.

If you do an analysis you will find that about 70% of time is consumed in last step, where we have least visibility into, yet the essential process which gives app-engine the ability to do all the heavy lifting.

like image 139
Vikram Tiwari Avatar answered Oct 02 '22 20:10

Vikram Tiwari