如何在不停止运行应用的情况下垂直缩放谷歌云实例 [英] How to vertically scale google cloud instance without stopping running app

本文介绍了如何在不停止运行应用的情况下垂直缩放谷歌云实例的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个Node.js应用程序,它提供了一个无法中断的服务。



然而,应用程序的负载会随着时间的推移而变化,为了节省成本,我希望vm实例机器类型根据负载自动调整(例如,当CPU利用率超过80%时,从1个vCPU(3.75 GB内存,n1-standard-1)扩展到2vCPU(7.5 GB内存,n1-standard-2))



这可能吗?



我已经看过使用容器引擎和kubernetes,但是由于应用程序运行时,应用程序无法复制到多个窗格并继续工作

您只能更改已停止的机器类型实例和实例仅在实例处于TERMINATED状态时才被视为停止。无法更改正在运行的实例的计算机类型。



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

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

解决方案

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

这篇关于如何在不停止运行应用的情况下垂直缩放谷歌云实例的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆