Skip to main content
Scale your deployments as traffic hits your endpoint. Traffic can change faster than you can react to it: pre-scale ahead of the spikes you can see coming, and let the autoscaler absorb the ones you can’t. This page covers applying scaling changes to a live deployment. To choose the values themselves, start with the autoscaling overview and match the settings to your traffic patterns.

Update autoscaling settings

Update autoscaling settings in place to pre-scale for a known traffic spike, raise a replica ceiling, or tune scale-down behavior. The change applies to the running deployment; replicas adjust without a new deploy.
To update autoscaling settings:
  1. Sign in to your workspace at app.baseten.co and choose Dedicated Inference in the sidebar.
  2. Select your model.
  3. On the model’s overview, choose Configure under the environment’s Replicas.
  4. Adjust your settings:
    • Replicas: the minimum and maximum replica count. Baseten scales within this range based on traffic.
    • Autoscaling window: how far back the autoscaler looks when averaging traffic for scaling decisions.
    • Scale down delay: how long the autoscaler waits after traffic drops before removing replicas.
    • Max scale down rate: the largest percentage of active replicas the autoscaler removes in a single scale-down step.
    • Concurrency target: the number of concurrent requests each replica handles before the autoscaler adds another.
    • Target utilization percentage: the share of the concurrency target at which scaling triggers.
  5. Choose Update to apply the changes.
The same dialog is in the environment card’s menu as Configure autoscaling.
Now that your deployment’s settings are updated, verify the changes reached the deployment. The update applies asynchronously, so the new values can take a moment to land:
To verify your settings:
  1. Sign in to your workspace at app.baseten.co and choose Dedicated Inference in the sidebar.
  2. Select your model.
  3. Select the deployment under Deployments.
  4. Review the current values on the Autoscaling settings card: replicas, autoscaling window, scale down delay, concurrency target, and target utilization.
For more information, see the update autoscaling settings endpoint. To update settings on whatever deployment an environment currently serves, use the environment settings endpoint instead.

Scale back down

After a spike passes, lower min_replica back to its normal floor with the same update procedure. Two settings control how fast replicas drain:
  • Scale down delay (scale_down_delay): how long the autoscaler waits after traffic drops before removing replicas.
  • Max scale down rate: the largest percentage of active replicas removed in a single step. Set it in the console’s Configure autoscaling dialog.
For example, drop the floor back to one replica and keep a 15-minute drain delay:
curl -X PATCH "https://api.baseten.co/v1/models/{model_id}/deployments/{deployment_id}/autoscaling_settings" \
  -H "Authorization: Bearer $BASETEN_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"min_replica": 1, "scale_down_delay": 900}'
{
  "status": "ACCEPTED",
  "message": "Your request to update autoscaling settings has been accepted. Query for deployment {deployment_id}'s status to see when the updates have been applied."
}
Replicas above the new floor drain gradually; traffic keeps flowing to the replicas that remain.

Scale to zero

Set min_replica to 0 to let an idle deployment release all its replicas and stop billing for compute.
Scaling to zero isn’t recommended for production endpoints: the first request after an idle period pays a cold start. Reserve it for development and staging deployments, or for workloads that tolerate the delay.
To scale to zero:
  1. Sign in to your workspace at app.baseten.co and choose Dedicated Inference in the sidebar.
  2. Select your model.
  3. On the model’s overview, choose Configure under the environment’s Replicas.
  4. Set Min replicas to 0.
  5. Choose Update to apply the changes.
The model’s endpoint stays live, and the next request spins a replica back up. To stop serving entirely, deactivate the deployment instead.

Wake a scaled-to-zero deployment

Wake a scaled-to-zero deployment before you need it, for example ahead of a demo or a batch job, so the first real request doesn’t pay the cold start.
To wake a deployment:
  1. Sign in to your workspace at app.baseten.co and choose Dedicated Inference in the sidebar.
  2. Select your model.
  3. Select the deployment under Deployments.
  4. Choose Wake deployment.
The environment card has the same action as Wake.
The deployment starts a replica in the background, moving from SCALED_TO_ZERO through WAKING_UP to ACTIVE; poll baseten model deployment describe until status is ACTIVE. A woken deployment with min_replica: 0 scales back down after scale_down_delay if no requests arrive, so wake it close to when you need it, or raise min_replica to hold it warm.

Next steps

Scaling changes take effect on the running deployment, so pair them with a quick status check before and after.