How to vertically scale google cloud instance without stopping running app

▼魔方 西西 提交于 2019-12-06 13:35:55

问题


I have a Node.js app that provides a service which cannot be interrupted.

However the load to the app varies overtime and to save cost I would like the vm instance machine type to autoscale in function of the load (ie when over 80% CPU utilisation, scale up from 1 vCPU(3.75 GB memory, n1-standard-1) to 2vCPU(7.5 GB memory, n1-standard-2))

Is this possible?

PS: I have looked at using the container engine and kubernetes but due to how the app operates, the app cannot be replicated to multiple pods and continue working


回答1:


You can only change the machine type of a stopped instance and an instance is considered stopped only when the instance is in the TERMINATED state. It is not possible to change the machine type of a running instance.

https://cloud.google.com/compute/docs/instances/changing-machine-type-of-stopped-instance



来源:https://stackoverflow.com/questions/45037213/how-to-vertically-scale-google-cloud-instance-without-stopping-running-app

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!