I'm using Google Cloud NodeJS hosting. I'm so surprised when I deploy apps to Google Cloud. It's very slow for each deployment. It could be slow the first time, but after that, when I change some js or html file and re-deploy, it is still slow.
Does it take 5~10 minutes to deploy a small project? How could I speed it up?
Prioritize primary content The Google Cloud page loads a large initial JavaScript bundle. The longer it takes to load and initialize this code, the longer it takes to load page-specific code and to render the list of Cloud Functions the user wants to see.
To reduce latency inside your applications, examine any remote procedure calls (RPCs) that communicate between VMs. This latency typically occurs when applications communicate between tiers or services. Tools such as Cloud Trace can help you decrease latency caused by application-serving requests.
When firing of gcloud preview app deploy the whole process takes ~8 minutes, most of which is "updating service".
To speed this up, we are going to do 3 steps: Pull the built image with a latest from Google Container Registry. Push the image we build with an additional tag, latest , so we can fetch it in the next build. Pass the image we pulled as a cache to the build step.
The nodejs apps use flexible environment based on docker files which take time to create/update. See How can I speed up Rails Docker deployments on Google Cloud Platform?
Also, when re-deploying the same version some additional time is required to update the service, see why does google appengine deployment take several minutes to update service
Potentially of interest as well:
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With