Skip to main content

实例计数

EXPERIMENTAL

Remotion Cloud Run 将根据服务请求的数量自动进行扩展和缩减。默认情况下,Remotion 服务没有并发处理能力。这意味着每个实例上只会进行一次渲染。当有另一个请求发起时,GCP 会启动另一个 Cloud Run 实例来执行该渲染。

🌐 Remotion Cloud Run will scale up and down as required to account for the number of requests being made to the service. By default, there is no concurrency in the Remotion services. This means that only one render will occur on an instance. When another request is made, GCP will spin up another Cloud Run instance to perform that render.

最小实例数

🌐 Minimum instance count

默认情况下,Cloud Run 服务的最小实例数将设置为 0。这样做的好处是它可以扩展到零,因此如果没有用户请求你的服务,你将不会被计费。你可能希望增加最小实例数,以便渲染能更快启动,但这只能减少同时渲染的冷启动时间,直到该最小限制为止。

🌐 By default, the Cloud Run service will have a minimum number of instances set to 0. The advantage of this is that it can scale to zero, so if no users are requesting your service, you will not be billed. You may wish to increase the minimum instances so that renders are started faster, though this would only remove cold start time for simultaneous renders up to that minimum limit.

warning

任何正在运行的实例,即使它们没有执行渲染,也将在 GCP 中计费。默认的最少实例数为零,这意味着当没有请求发送到你的服务时,你不会被收费。

最大实例数

🌐 Maximum instance count

这是一次可以创建的实例的最大数量,默认设置为100。在GCP中可设置的最大值也是100 - 有关限制的更多信息可以在这里找到。如果超过最大实例数量,后续的请求将以 503 service unavailable 响应失败。GCP提供了用于排队请求的Cloud Tasks,可以与Cloud Run结合使用

🌐 This is the maximum number of instances that can be created at one time, with the default set to 100. The maximum that can be set in GCP is also 100 - more information around limits can be found here. If the maximum number of instances is exceeded, further requests will fail with a 503 service unavailable response. GCP provides Cloud Tasks for queueing requests, which can be used in conjunction with Cloud Run.

note

你可能希望为你产品的某些层级提供较低的最大实例限制,并为更高级别的计划提供更高的实例限制。这可以通过部署多个 Cloud Run 服务并根据需要在你的产品中调用它们来实现。

另请参阅

🌐 See also