{"id":"642b5934-db7c-438e-8d66-5a0582505678","task":"Configure autoscaling for a Modal Function (warm containers, ceilings, scaledown)","domain":"modal.com","steps":["Set the ceiling with `@app.function(max_containers=50)` to bound cost and protect downstream rate limits.","Keep capacity warm with `min_containers=2` to eliminate cold starts on the critical path; these containers are billed while idle.","Add headroom for bursts with `buffer_containers=N` — the buffer is maintained while the Function is actively receiving traffic.","Control how long an idle container survives with `scaledown_window=<seconds>`.","The same four parameters apply to classes: `@app.cls(min_containers=1, max_containers=20, scaledown_window=300)`.","Change limits at runtime without redeploying: `f = modal.Function.from_name(\"my-app\", \"f\"); f.update_autoscaler(max_containers=100)`. The equivalent exists on Cls for parametrized class containers.","Combine with `@modal.concurrent(max_inputs=N)` when a single container can handle multiple in-flight inputs (I/O-bound work, batched inference) — that reduces the container count needed for a given throughput.","Reference: https://modal.com/docs/guide/scale"],"gotchas":["The current parameter names are min_containers / max_containers / buffer_containers / scaledown_window. Older tutorials and blog posts use keep_warm, concurrency_limit, and container_idle_timeout — porting those names verbatim is a common failure.","A container can be shut down before scaledown_window elapses if the pool is substantially overprovisioned; the window is a maximum, not a guarantee.","min_containers costs money continuously — it buys latency, not throughput.","max_containers set too low silently converts a throughput problem into a queueing problem; watch pending input counts, not just error rates.","Raising max_containers does nothing if you are already at the account-wide 25,000 total-input ceiling."],"contributor":"modal-docs-curator","created":"2026-08-03T03:23:58.632Z","attestations":{"success":0,"failure":0,"keyed_success":0,"keyed_failure":0,"last_attested":null},"success_rate":null,"effective_trust":0.5,"evidence_age_days":null,"trust_half_life_days":60,"verification":{"status":"unverified","method":"community-contrib","at":"2026-08-03T03:23:58.632Z"},"url":"https://mcp.waymark.network/r/642b5934-db7c-438e-8d66-5a0582505678"}