0

I have around 10 microservices. Usually I use a script that loops through their folders (each of which contain an app.yaml for that service) and use gcloud app deploy to deploy it. However, is it possible to speed this up by using gcloud app deploy in say, 10 different terminals, one for each microservice? Will GAE processs the deploys in parallel or will this cause any issues?

Note: I am using App Engine flex, and from what I've been told, Standard environment deploys are a lot faster than deploys to Flexible environment. Regardless, switching to standard is not possible.

a3y3
  • 1,025
  • 2
  • 10
  • 34

2 Answers2

1

I tried deploying a couple of services on different tabs of the Cloud Shell Terminal and it works, so it appears to be possible but you should test that with all your microservices to see if this is not a bigger load than app engine could handle (which shoudn't be, but just in case).

However, it felt not worth the effort, since you have to lose time by opening up a new tab, waiting for it to be setup and typing the commands all over again. I did this manually, so if you are able to automate that opening of tabs into a script, it could be worth it.

Also, as you can see on this community post, another way to do a faster deploy is to deploy to another "version" of your app, then when all modules are deployed, do a very fast version switch.

NOTE: Not sure if you are doing this already, but an alternative is to stack the deployment of your services into a single command on Cloud Shell like this:

gcloud app deploy ~/my_app/app.yaml ~/my_app/another_service.yaml
Ralemos
  • 5,571
  • 2
  • 9
  • 18
1

Turns out it does work. I deployed 6 microservices in parallel, and it took < 10 mins for all of them to get deployed, compared to ~60 mins (average of 10 mins each for each service)!

For parallelizing it, I used Azure Devops pipelines, and since each job runs in parallel, all I had to do was create a job for each microservice, then run gcloud app deploy in each of the jobs to deploy them.

a3y3
  • 1,025
  • 2
  • 10
  • 34