These are starting points, not final answers. Monitor your
deployment’s performance and adjust based on observed behavior. See
Autoscaling for parameter details.
Identify your pattern
Not sure which pattern you have? Check your metrics:- Sign in to your workspace at app.baseten.co and choose Dedicated Inference in the sidebar, then select your model.
- Choose the Metrics tab.
- Look at Inference volume and Replicas over the past week.
- Compare to the patterns below.
Some workloads are a mix of patterns. If your traffic has both smooth diurnal patterns AND occasional bursts, optimize for the bursts (they cause the most pain) and accept slightly higher cost during steady periods.
Jittery traffic
Small, frequent spikes that quickly return to baseline.Characteristics
- Baseline replica count is steady, but spikes up by 2x several times per hour.
- Spikes are short-lived and return to baseline quickly.
- Often not real load growth, just temporary surges causing overreaction.
Common causes
- Consumer products with intermittent usage bursts.
- Traffic splitting or A/B testing with low percentages.
- Polling clients with synchronized intervals.
Recommended settings
A longer autoscaling window averages out the jitter so the autoscaler doesn’t chase every small spike. You’re trading reaction speed for stability, which is acceptable when the spikes aren’t sustained load increases.
Bursty traffic
Characteristics
- Traffic jumps sharply (2x+ within 60 seconds).
- Stays high for a sustained period before dropping.
- The “pain” is queueing and latency spikes while new replicas start.
Common causes
- Daily morning ramp-up (users starting their day).
- Marketing events, product launches, viral moments.
- Top-of-hour scheduled jobs or cron-triggered traffic.
Recommended settings
Short window means fast reaction. Long delay prevents scaling down between waves. Lower utilization gives you buffer capacity while new replicas start.
Pre-warming for predictable bursts
To pre-warm before a predictable burst (morning ramp, scheduled events):-
Before the expected spike, bump min replicas:
Request
-
After the burst subsides, reset to your normal minimum:
Request
Scheduled traffic
Characteristics
- Long periods of low or zero traffic.
- Large bursts tied to job schedules (hourly, daily, weekly).
- Traffic patterns are predictable but infrequent.
Common causes
- ETL pipelines and data processing jobs.
- Embedding backfills and batch inference.
- Periodic evaluation or testing jobs.
- Document processing triggered by user uploads.
Recommended settings
Scale-to-zero saves significant cost during idle periods. The moderate window prevents overreacting to the initial requests of a batch. If jobs come in waves, a longer delay keeps replicas warm between them.
Scheduled pre-warming
To pre-warm for predictable batch jobs, use cron + API:-
Five minutes before the hourly job, scale up:
Terminal
-
Thirty minutes after the job completes, scale back down:
Terminal
Steady traffic
Characteristics
- Traffic rises and falls gradually over the day.
- Classic diurnal pattern with no sharp edges.
- Predictable, cyclical behavior.
Common causes
- Always-on inference APIs with consistent user base.
- B2B applications with business-hours usage.
- Production workloads with stable, mature traffic.
Recommended settings
Without sudden spikes, you don’t need as much headroom. You can run replicas at higher utilization (lower cost) because load changes are gradual and predictable. The autoscaler has time to react.
Next steps
- Autoscaling: Full parameter documentation.
- Scale a deployment: Apply these settings from the CLI or API.
- Troubleshooting autoscaling: Diagnose and fix common problems.
- Truss configuration reference: Configure predict_concurrency in your model.