Skip to main content
By default, Beam is serverless, which means your applications will shut off automatically when they’re not being used.

Configuring Keep Warm

You can control how long your containers are kept alive by using the keep_warm_seconds flag in your deployment trigger. For example, by adding a keep_warm_seconds=300 argument to an endpoint, an idle container remains warm for 5 minutes after activity before it can scale down:
When keep_warm_seconds is set in your deployment, it will count as billable usage.

Setting Always-On Containers

Any running containers count towards billable usage. Take care to avoid setting min_containers unless you’re comfortable paying for usage 24/7.
You can configure the number of containers running at baseline using the min_containers field. By setting min_containers=1, the autoscaler maintains a target of at least one running container while the deployment is active.
After redeploying, stop any older versions you no longer need. Your rollout strategy determines whether they stop automatically.

Pre-Warming Your Container

You can pre-warm your containers by adding /warmup to the end of your deployment URL:
When invoked, this endpoint will send a request to the container to warm-up. Endpoint, ASGI, and task-queue deployments support the warmup route. This is not a universal route for arbitrary Pod web servers. The gateway also exposes these path forms:

Default Container Spin-down Times

After handling a request, Beam keeps containers running (“warm”) for a certain amount of time in order to quickly handle future requests. By default, these are the container “keep warm” times for each deployment type: