Cloud 运行 中的长 运行 任务始终分配 CPU
Long running task in Cloud Run with CPU always allocated
我知道自 Oct-21 Cloud 运行 支持后台作业。
有谁知道在以下情况下长时间 运行 后台作业会发生什么情况?
- CPU 始终分配设置为 true
- 分钟。实例数设置为 1
- 由于负载较高,同时有多个实例,而且每个实例都是巧合的运行后台作业
是否保证所有这些后台作业都能完成,或者只有 运行 那个“永远在线”实例上的一个?
谢谢!
超过最小实例创建的实例将被终止。
Note that even if CPU is always allocated, Cloud Run autoscaling is
still in effect, and may terminate container instances if they aren't
needed to handle incoming traffic. An instance will never stay idle
for more than 15 minutes after processing a request unless it is kept
active using minimum instances.
Combining CPU always allocated with a number of minimum instances
results in a number of container instances up and running with full
access to CPU resources, enabling background processing use cases like
pulling Pub/Sub messages.
https://cloud.google.com/run/docs/configuring/cpu-allocation
我知道自 Oct-21 Cloud 运行 支持后台作业。
有谁知道在以下情况下长时间 运行 后台作业会发生什么情况?
- CPU 始终分配设置为 true
- 分钟。实例数设置为 1
- 由于负载较高,同时有多个实例,而且每个实例都是巧合的运行后台作业
是否保证所有这些后台作业都能完成,或者只有 运行 那个“永远在线”实例上的一个?
谢谢!
超过最小实例创建的实例将被终止。
Note that even if CPU is always allocated, Cloud Run autoscaling is still in effect, and may terminate container instances if they aren't needed to handle incoming traffic. An instance will never stay idle for more than 15 minutes after processing a request unless it is kept active using minimum instances.
Combining CPU always allocated with a number of minimum instances results in a number of container instances up and running with full access to CPU resources, enabling background processing use cases like pulling Pub/Sub messages.
https://cloud.google.com/run/docs/configuring/cpu-allocation