{"playbook":"Scaling","url":"https://agentwranglers.se/playbook/scaling","updated":"2026-10-27","license":"https://creativecommons.org/licenses/by/4.0/","credit":"Required by the licence: credit Agent Wranglers with a link to the rule or playbook you used.","ids":"Each rule has an id, such as PAY-14, that never changes. Open a rule by its id at /r/PAY-14. Its revision changes whenever its content changes.","how":"Each rule's How and Measured text is on its own page: add .md to its url.","rules":[{"id":"SCL-1","revision":"6e4635d07998","updated":"2026-10-27","name":"Find the bottleneck before you add servers","level":"Recommended","rule":"Before any scaling change, name the one resource that limits the service and show the metric that proves it. Then scale only that resource.","check":"Every scaling change in the last 12 months has a note that names the saturated resource. The note shows that resource's metric before and after the change. The work ends when a load test at the planned peak from the [load model](https://agentwranglers.se/playbook/scaling/measure-before-you-scale/load-model) keeps every resource under 70% busy. The 95th percentile must also stay within its objective.","check_type":"manual","url":"https://agentwranglers.se/playbook/scaling/measure-before-you-scale/find-the-bottleneck","related":["/playbook/testing/performance-tests/load-tests","/playbook/operations/metrics-and-traces/resource-metrics","/playbook/scaling/measure-before-you-scale/load-model","/playbook/scaling/growing-the-database/early-sharding"],"sources":["https://sre.google/sre-book/handling-overload/"]},{"id":"SCL-2","revision":"f991217a5481","updated":"2026-10-22","name":"Profile the slow path before you change it","level":"Recommended","rule":"Before you rewrite slow code, record a CPU profile of the slow route under load. Change the function that takes the most time, then profile again.","check":"The change notes for each speed fix show the top function in the profile before and after. They give its share of CPU time, such as \"from 41% to 6%\".","check_type":"manual","url":"https://agentwranglers.se/playbook/scaling/measure-before-you-scale/profile-first","related":["/playbook/operations/metrics-and-traces/continuous-profiling","/playbook/operations/metrics-and-traces/distributed-tracing","/playbook/data/queries-and-indexes/query-plans"],"sources":["https://nodejs.org/api/cli.html","https://docs.python.org/3/library/profiling.sampling.html"]},{"id":"SCL-3","revision":"c0be52aba8a5","updated":"2026-10-27","name":"Write down the load you plan for","level":"Recommended","rule":"Keep one written load model in the repository. It states the peak requests per second on the busiest routes, the share of writes, the data size and the growth expected over 12 months.","check":"The load model file is dated within the last 6 months. The share of each route in the load test script is within 10 percentage points of its share in the model.","check_type":"command","url":"https://agentwranglers.se/playbook/scaling/measure-before-you-scale/load-model","related":["/playbook/operations/capacity-and-resilience/headroom","/playbook/scaling/measure-before-you-scale/find-the-bottleneck","/playbook/operations/metrics-and-traces/red-metrics","/playbook/testing/performance-tests/load-tests","/playbook/scaling/load-balancing-and-autoscaling/scale-before-known-peaks"],"sources":["https://sre.google/sre-book/introduction/"]},{"id":"SCL-4","revision":"96417ae9eade","updated":"2026-10-22","name":"Size workers and pools from rate times duration","level":"Recommended","rule":"Work out how much work runs at once as the arrival rate times the time each item takes. Size threads, workers and connection pools from that number, not by guessing.","check":"Each pool's size is within a factor of 2 of the peak rate times the 99th percentile time over the last 30 days. Under the load test, the 95th percentile wait for a pool connection stays under 10 ms.","check_type":"manual","url":"https://agentwranglers.se/playbook/scaling/measure-before-you-scale/size-from-rate-and-duration","related":["/playbook/operations/metrics-and-traces/red-metrics","/playbook/scaling/growing-the-database/connection-budget"],"sources":[]},{"id":"SCL-5","revision":"bfb8f75d2a57","updated":"2026-10-27","name":"Make one server fast before you add more","level":"Recommended","rule":"Fix slow queries and repeated work, and try a larger machine, before you spread the app across many servers.","check":"Each move to more app or database servers has a decision note. It links a load test where the largest planned machine passed 70% CPU or broke its 95th percentile objective at the planned peak. Otherwise it names the availability target that needs a second machine.","check_type":"manual","url":"https://agentwranglers.se/playbook/scaling/measure-before-you-scale/scale-up-first","related":["/playbook/data/queries-and-indexes/no-n-plus-one","/playbook/data/queries-and-indexes/index-the-queries-you-run","/playbook/operations/capacity-and-resilience/multiple-zones"],"sources":[]},{"id":"SCL-6","revision":"3aa8ca09954a","updated":"2026-10-22","name":"Run two copies of the app in staging","level":"Recommended","applies":["servers"],"rule":"Run at least two copies of the app behind the load balancer in staging, with no sticky sessions. State hidden in one process then fails in tests, not in production.","check":"Staging runs 2 or more copies of the app. The end-to-end suite passes with the load balancer set to round robin and session affinity off.","check_type":"command","url":"https://agentwranglers.se/playbook/scaling/stateless-app-servers/two-copies-in-staging","related":["/playbook/scaling/stateless-app-servers/stateless-processes","/playbook/agents-as-users/mcp-servers/stateless-mcp-server"],"sources":["https://12factor.net/processes"]},{"id":"SCL-8","revision":"914c2ae89359","updated":"2026-10-27","name":"Keep locks and counters in a shared store","level":"Required","risk":"money","applies":["servers"],"rule":"Keep every lock, counter and \"already done\" set that must hold across requests in a store all copies see. Never keep it in process memory.","check":"Search the code for in-memory locks, mutexes, and module-level sets or maps that track requests. None guards work that changes data. Run two copies and send 50 parallel redemptions of one coupon. Exactly one succeeds.","check_type":"static","url":"https://agentwranglers.se/playbook/scaling/stateless-app-servers/shared-locks-and-counters","related":["/playbook/architecture/concurrency/lock-order","/playbook/data/transactions-and-concurrency/conditional-writes","/playbook/application-security/limits-and-business-logic/rate-limits","/playbook/scaling/caching/stampede-protection","/playbook/scaling/growing-the-database/hot-rows"],"sources":["https://redis.io/docs/latest/commands/set/","https://www.postgresql.org/docs/current/explicit-locking.html"]},{"id":"SCL-9","revision":"1aa95f4dceb9","updated":"2026-10-27","name":"Start fast and warm up before taking traffic","level":"Recommended","applies":["servers"],"rule":"A new copy of the app is ready within 30 seconds of starting. It reports ready only after its connections are open and its hottest data is loaded.","check":"Start a new copy on staging 5 times. Each passes its readiness check within 30 seconds. The 95th percentile of its first 100 requests is under 2 times the steady value.","check_type":"manual","url":"https://agentwranglers.se/playbook/scaling/stateless-app-servers/fast-warm-start","related":["/playbook/engineering/build-test-and-deploy/health-check-and-rollback"],"sources":["https://12factor.net/disposability","https://sre.google/sre-book/addressing-cascading-failures/"]},{"id":"SCL-10","revision":"367c25df565f","updated":"2026-10-27","name":"Run web and worker processes apart","level":"Recommended","applies":["servers"],"rule":"Run request handling and background work as separate process types from the same build, so each scales on its own.","check":"The deploy settings list web and worker as separate types with separate counts. Change the worker count on staging, and no web process restarts.","check_type":"manual","url":"https://agentwranglers.se/playbook/scaling/stateless-app-servers/web-and-worker-processes","related":["/playbook/architecture/structure/split-services-for-a-reason","/playbook/operations/running-the-service/resource-limits","/playbook/scaling/load-balancing-and-autoscaling/scale-on-saturation","/playbook/events/background-jobs-and-queues/single-job-runs"],"sources":["https://12factor.net/concurrency"]},{"id":"SCL-37","revision":"45b266a9d34c","updated":"2026-10-27","name":"Keep no state inside the app process","level":"Required","risk":"data","applies":["servers"],"rule":"Keep sessions, uploads and pending jobs outside the app process and its local disk. Any copy of the app can then stop or start without losing them. Never pin visitors to one server to hide state there.","check":"The load balancer configuration has no session affinity setting, such as `ip_hash` or a sticky cookie. Sign in, upload a file and start a background job on a test server. Deploy a fresh copy of the app on a new machine and stop the old one. The session, the file and the job are all still there.","check_type":"manual","url":"https://agentwranglers.se/playbook/scaling/stateless-app-servers/stateless-processes","related":["/playbook/scaling/stateless-app-servers/two-copies-in-staging","/playbook/files-and-media/uploads/presigned-uploads","/playbook/engineering/build-test-and-deploy/atomic-deploys-with-rollback","/playbook/operations/running-the-service/graceful-shutdown"],"sources":["https://12factor.net/processes"]},{"id":"SCL-11","revision":"2eacac6dcfe0","updated":"2026-10-22","name":"Cache what is read often and costly to build","level":"Recommended","rule":"Add a cache only for a read that statistics or traces show is frequent and slow. Measure each cache's hit rate, and remove caches that mostly miss.","check":"Every cache has a hit rate graph on the service dashboard. Over the last 7 days, each cache's hit rate is 50% or more, or the cache has a written reason.","check_type":"manual","url":"https://agentwranglers.se/playbook/scaling/caching/cache-hot-reads","related":["/playbook/data/caches-and-copies/source-of-truth","/playbook/scaling/caching/cache-freshness","/playbook/data/operations/slow-query-log"],"sources":["https://redis.io/docs/latest/develop/reference/eviction/"]},{"id":"SCL-12","revision":"b202e7e88e4d","updated":"2026-10-22","name":"Put a format version in every cache key","level":"Recommended","rule":"Build each server cache key from a prefix, the data's format version and every input that changes the value. Add the tenant or user for private data.","check":"Each key builder includes its version constant. A test fills the cache with entries of the old version, raises the version and reads again. It gets a miss, not a parse error.","check_type":"manual","url":"https://agentwranglers.se/playbook/scaling/caching/versioned-cache-keys","related":["/playbook/data/multi-tenancy/tenant-scoped-storage","/playbook/app-ui/client-and-server-state/complete-cache-keys"],"sources":[]},{"id":"SCL-13","revision":"325fa11dda62","updated":"2026-10-22","name":"Let one caller rebuild an expired entry","level":"Recommended","rule":"When a hot entry expires, let one caller rebuild it while the others wait for that result or get the old value. Add random jitter to every expiry time.","check":"In a test, expire a hot key while 500 requests read it at once. The source is called at most once per app copy, and no request fails.","check_type":"http","url":"https://agentwranglers.se/playbook/scaling/caching/stampede-protection","related":["/playbook/scaling/stateless-app-servers/shared-locks-and-counters","/playbook/scaling/caching/hot-cache-keys"],"sources":["https://www.rfc-editor.org/rfc/rfc5861"]},{"id":"SCL-14","revision":"d3d604442f2e","updated":"2026-10-27","name":"Cap the cache server's memory and choose its eviction","level":"Required","risk":"outage","applies":["servers"],"rule":"Set a memory limit and an eviction policy on every cache server. Keep data that must not be evicted, such as job queues, in a separate instance that never evicts.","check":"`CONFIG GET maxmemory` returns a value above 0 on every instance. Cache instances use an `allkeys-` policy, and queue instances use `noeviction`. No instance holds both caches and queues.","check_type":"manual","url":"https://agentwranglers.se/playbook/scaling/caching/cache-memory-and-eviction","related":["/playbook/operations/capacity-and-resilience/exhaustion-alerts"],"sources":["https://redis.io/docs/latest/develop/reference/eviction/","https://valkey.io/topics/lru-cache/"]},{"id":"SCL-15","revision":"1afe48e7bd1e","updated":"2026-10-27","name":"Keep the app working when the cache is gone","level":"Required","risk":"outage","rule":"Treat every cache call as optional. On a cache error or timeout, read from the source, so the service stays up when the cache is down or empty.","check":"Stop the cache server on staging while the load test runs at the planned peak. The error rate stays under 1%. After the cache returns, response times are back to normal within 5 minutes.","check_type":"http","url":"https://agentwranglers.se/playbook/scaling/caching/survive-cache-loss","related":["/playbook/operations/capacity-and-resilience/circuit-breakers","/playbook/api-design/reliability/timeouts","/playbook/operations/capacity-and-resilience/load-shedding"],"sources":["https://sre.google/sre-book/addressing-cascading-failures/"]},{"id":"SCL-35","revision":"199c7e59e0be","updated":"2026-10-22","name":"Decide how stale a cache may be","level":"Recommended","rule":"Give every cached value an expiry or an invalidation rule, chosen for how stale it may safely be.","check":"Change a cached value through the app. The next read shows the new value, or the stale one only within its stated expiry.","check_type":"manual","url":"https://agentwranglers.se/playbook/scaling/caching/cache-freshness","related":["/playbook/architecture/system-architecture/consistency-model","/playbook/data/caches-and-copies/replica-lag","/playbook/ai-features/latency-cost-and-fallbacks/answer-cache","/playbook/app-ui/client-and-server-state/refresh-after-change","/playbook/stack/databases-and-storage/redis-or-valkey","/playbook/scaling/caching/cache-hot-reads","/playbook/website/performance/cache-control"],"sources":[]},{"id":"SCL-42","revision":"8e2909d937cf","updated":"2026-10-27","name":"Spread the reads of one hot cache key","level":"Recommended","rule":"Find the cache keys that take more than 10% of all reads. Keep a copy of each in every app process for a few seconds, or copy it to several keys spread across the cache servers.","check":"Under the load test at the planned peak, the busiest cache server's CPU is at most 2 times the average of the others. No single key takes more than 10% of the reads that reach the cache.","check_type":"manual","url":"https://agentwranglers.se/playbook/scaling/caching/hot-cache-keys","related":["/playbook/scaling/growing-the-database/hot-rows","/playbook/scaling/caching/stampede-protection"],"sources":["https://redis.io/docs/latest/develop/reference/eviction/"]},{"id":"SCL-43","revision":"1c16aae6c992","updated":"2026-10-27","name":"Cache public pages at the edge for a few seconds","level":"Recommended","rule":"Let the content delivery network or proxy keep public pages that change often, such as a product list, for 1 to 10 seconds with `s-maxage`. Collapse parallel misses into one request to the app.","check":"Send 1,000 requests for one public page within 5 seconds through the edge. The app's access log shows at most 2 requests for that page. A request with a session cookie for a signed-in page reaches the app every time.","check_type":"http","url":"https://agentwranglers.se/playbook/scaling/caching/edge-micro-cache","related":["/playbook/application-security/requests-files-and-caches/private-responses-uncached","/playbook/website/performance/cache-control"],"sources":["https://www.rfc-editor.org/rfc/rfc9111#section-5.2.2.10","https://nginx.org/en/docs/http/ngx_http_proxy_module.html#proxy_cache_lock"]},{"id":"SCL-39","revision":"cd8adaa5356b","updated":"2026-10-27","name":"Build large exports ahead of time","level":"Recommended","rule":"Build large generated files, such as full-content dumps, feeds, sitemaps and JSON exports, at build or deploy time. Serve them as static files with compressed copies made in the same step.","check":"The build output holds each large file with `.gz` and `.br` copies. Requests for those files never appear in the app's access log and carry no app time in `Server-Timing`. Their first byte leaves the server within 20 ms.","check_type":"command","url":"https://agentwranglers.se/playbook/scaling/exports-and-fair-share/build-exports-ahead","related":["/playbook/testing/performance-tests/single-request-stall","/playbook/api-design/reliability/long-running-jobs","/playbook/website/site-architecture/render-at-build-time-serve-from-memory","/playbook/files-and-media/generated-documents/document-jobs"],"sources":["https://nginx.org/en/docs/http/ngx_http_gzip_static_module.html"]},{"id":"SCL-31","revision":"ff7078eef2b9","updated":"2026-10-27","name":"Cap each customer's running and queued jobs","level":"Recommended","applies":["accounts"],"rule":"Cap how much work each customer or tenant can have running or queued at once. One heavy customer then slows only their own work.","check":"On staging, one tenant starts 100 exports at once. No more than its cap run together, and an export from another tenant starts within 30 seconds.","check_type":"command","url":"https://agentwranglers.se/playbook/scaling/exports-and-fair-share/per-tenant-limits","related":["/playbook/data/multi-tenancy/noisy-neighbours","/playbook/application-security/limits-and-business-logic/rate-limits","/playbook/agents-as-users/quotas-and-pricing/quota-per-grant","/playbook/usage-billing/margins-and-model-cost/customer-margin-alert","/playbook/files-and-media/quotas-and-cost/storage-quotas"],"sources":["https://sre.google/sre-book/handling-overload/"]},{"id":"SCL-23","revision":"cc5e12a60d7d","updated":"2026-10-22","name":"Fit the connection budget to the autoscaling maximum","level":"Required","risk":"outage","applies":["servers"],"stack":["postgres"],"rule":"The maximum number of copies of each process type times its pool size, summed over all types, stays below the database's connection limit. Check it whenever a maximum or a pool size changes.","check":"A test in CI reads the deploy settings and sums the maximum copies times the pool size for every process type. The sum is at most 90% of `max_connections` minus the reserved connections.","check_type":"command","url":"https://agentwranglers.se/playbook/scaling/growing-the-database/connection-budget","related":["/playbook/scaling/measure-before-you-scale/size-from-rate-and-duration","/playbook/data/operations/connection-pooling","/playbook/stack/databases-and-storage/pgbouncer","/playbook/scaling/load-balancing-and-autoscaling/scale-on-saturation","/playbook/scaling/load-balancing-and-autoscaling/serverless-concurrency"],"sources":["https://www.postgresql.org/docs/current/runtime-config-connection.html"]},{"id":"SCL-25","revision":"53b7188611a9","updated":"2026-10-22","name":"Partition tables that outgrow memory","level":"Recommended","stack":["postgres"],"rule":"Split a table into partitions by date or tenant once it is larger than the database server's memory. Drop or detach old partitions instead of deleting their rows.","check":"Every table larger than the server's memory is partitioned or has a written reason. `EXPLAIN` on the 5 most frequent queries of each partitioned table scans only the matching partitions. Next month's partition exists by the 20th.","check_type":"manual","url":"https://agentwranglers.se/playbook/scaling/growing-the-database/partition-large-tables","related":["/playbook/scaling/growing-the-database/capacity"],"sources":["https://www.postgresql.org/docs/current/ddl-partitioning.html"]},{"id":"SCL-26","revision":"6af7fdd090c9","updated":"2026-10-22","name":"Move finished rows out of hot tables","level":"Recommended","rule":"Move rows the app no longer changes, such as orders closed more than 2 years ago, into an archive table or store. The hot table keeps what daily work touches.","check":"The archive job reports a heartbeat after each run. The hot table holds no finished row older than the agreed age plus 1 month.","check_type":"command","url":"https://agentwranglers.se/playbook/scaling/growing-the-database/archive-old-rows","related":["/playbook/scaling/growing-the-database/small-batches","/playbook/data/personal-data/retention-jobs"],"sources":["https://www.postgresql.org/docs/current/ddl-partitioning.html"]},{"id":"SCL-27","revision":"85315197f271","updated":"2026-10-22","name":"Change large tables in small batches","level":"Required","risk":"outage","rule":"Update, delete or copy many rows in batches of at most 10,000, each in its own short transaction, with a pause between them. Never touch millions of rows in one statement.","check":"Every data migration and job that changes rows uses batches of 10,000 rows or fewer per transaction. Run the backfill on a production-sized copy. No request waits longer than the lock timeout, and replica lag stays under its limit.","check_type":"http","url":"https://agentwranglers.se/playbook/scaling/growing-the-database/small-batches","related":["/playbook/scaling/growing-the-database/archive-old-rows","/playbook/data/queries-and-indexes/keyset-pagination","/playbook/data/migrations/expand-and-contract","/playbook/events/background-jobs-and-queues/spread-scheduled-jobs"],"sources":["https://dev.mysql.com/doc/refman/8.4/en/delete.html","https://www.postgresql.org/docs/current/routine-vacuuming.html"]},{"id":"SCL-40","revision":"07818c9ca278","updated":"2026-10-27","name":"Spread writes that all land on one row","level":"Recommended","stack":["postgres"],"rule":"When most requests update one row or key, such as a view counter, split it into several rows or batch the updates. Writers must not queue on one lock.","check":"Run the load test at the planned peak on staging, with PostgreSQL's `log_lock_waits = on` and `deadlock_timeout = 100ms` or the same setting in your database. The log shows no lock wait on a counter or total table.","check_type":"command","url":"https://agentwranglers.se/playbook/scaling/growing-the-database/hot-rows","related":["/playbook/scaling/caching/hot-cache-keys","/playbook/scaling/stateless-app-servers/shared-locks-and-counters","/playbook/data/transactions-and-concurrency/transactions","/playbook/testing/performance-tests/load-tests"],"sources":["https://www.postgresql.org/docs/current/runtime-config-logging.html"]},{"id":"SCL-28","revision":"7f107d6d8365","updated":"2026-10-22","name":"Splitting one database across servers too early","level":"Avoid","rule":"Do not spread one database across several servers while a larger server, replicas, partitions or archiving can still carry the load.","check":"The database runs on one primary with replicas. Otherwise a decision record shows the measured load that a larger server, replicas, partitions and archiving could not carry.","check_type":"command","url":"https://agentwranglers.se/playbook/scaling/growing-the-database/early-sharding","related":["/playbook/scaling/measure-before-you-scale/find-the-bottleneck","/playbook/scaling/growing-the-database/capacity"],"sources":[]},{"id":"SCL-36","revision":"b48c45ddbcb6","updated":"2026-10-27","name":"Watch size and growth","level":"Recommended","rule":"Record the size of the database and of its 10 biggest tables every day. Forecast when each disk or plan limit will be reached.","check":"The monitoring shows a daily size graph for the database and its 10 biggest tables over the last 90 days. A test alert fires when the threshold is lowered below today's size.","check_type":"manual","url":"https://agentwranglers.se/playbook/scaling/growing-the-database/capacity","related":["/playbook/data/operations/maintenance","/playbook/scaling/growing-the-database/partition-large-tables","/playbook/scaling/growing-the-database/early-sharding","/playbook/operations/capacity-and-resilience/exhaustion-alerts"],"sources":["https://www.postgresql.org/docs/current/diskusage.html"]},{"id":"SCL-29","revision":"de62f1bc9fd9","updated":"2026-10-22","name":"Spread load by requests in flight","level":"Recommended","applies":["servers"],"rule":"Send each request to the ready backend with the fewest requests or connections in flight, not strictly in turn. Take a backend out of rotation when connections to it fail.","check":"Under the load test, the busiest backend's CPU is at most 1.3 times the least busy one's. Stop one backend's process. Within 30 seconds no request goes to it, and the error rate stays under 1%.","check_type":"http","url":"https://agentwranglers.se/playbook/scaling/load-balancing-and-autoscaling/least-requests-balancing","related":["/playbook/engineering/build-test-and-deploy/health-check-and-rollback","/playbook/operations/running-the-service/graceful-shutdown"],"sources":["https://sre.google/sre-book/load-balancing-datacenter/","https://nginx.org/en/docs/http/ngx_http_upstream_module.html"]},{"id":"SCL-30","revision":"866482515719","updated":"2026-10-27","name":"Scale on the resource that runs out","level":"Recommended","applies":["servers"],"stack":["aws"],"rule":"Drive autoscaling from the metric that limits each process type, such as CPU, requests in flight per copy or the age of the oldest job. Set a minimum, a maximum and a slow scale-down.","check":"Run the load test at the planned peak on staging with autoscaling on. New copies start within 3 minutes of the rise, and the 95th percentile stays within its objective. Copies return to the minimum within 15 minutes after the load ends.","check_type":"command","url":"https://agentwranglers.se/playbook/scaling/load-balancing-and-autoscaling/scale-on-saturation","related":["/playbook/operations/capacity-and-resilience/headroom","/playbook/infrastructure/containers-and-orchestration/kubernetes-requests-and-limits","/playbook/scaling/stateless-app-servers/web-and-worker-processes","/playbook/operations/alerts-and-on-call/queue-age","/playbook/scaling/growing-the-database/connection-budget","/playbook/scaling/load-balancing-and-autoscaling/scale-before-known-peaks"],"sources":["https://kubernetes.io/docs/tasks/run-application/horizontal-pod-autoscale/","https://docs.aws.amazon.com/wellarchitected/latest/reliability-pillar/rel_adapt_to_changes_autoscale_adapt.html"]},{"id":"SCL-41","revision":"0c9a64f728be","updated":"2026-10-27","name":"Scale up before a peak you know is coming","level":"Recommended","rule":"Before a launch, a campaign or another dated peak, raise the minimum number of copies and the database size to the planned peak. Lower them again after.","check":"Every dated peak on the launch checklist has a planned minimum and a start time. At each start time in the last 12 months, the scaling history shows at least that many copies running.","check_type":"manual","url":"https://agentwranglers.se/playbook/scaling/load-balancing-and-autoscaling/scale-before-known-peaks","related":["/playbook/infrastructure/hosting-platforms/cloud-quotas","/playbook/scaling/measure-before-you-scale/load-model","/playbook/operations/capacity-and-resilience/headroom","/playbook/operations/running-the-service/launch-readiness","/playbook/scaling/load-balancing-and-autoscaling/scale-on-saturation"],"sources":["https://sre.google/sre-book/reliable-product-launches/"]},{"id":"SCL-32","revision":"8fa5be8c2a60","updated":"2026-10-27","name":"Turn off optional work under load","level":"Recommended","rule":"Mark the features the service can live without, such as recommendations or live counters. Keep a switch that turns them off under overload without a deploy.","check":"Flip the switch on staging under the planned peak. CPU per request drops by 20% or more, pages still load, and the error rate stays under 1%. The last such test is less than 90 days old.","check_type":"http","url":"https://agentwranglers.se/playbook/scaling/load-balancing-and-autoscaling/degrade-under-load","related":["/playbook/operations/capacity-and-resilience/load-shedding","/playbook/engineering/running-in-production/deploy-is-not-release"],"sources":["https://sre.google/sre-book/addressing-cascading-failures/"]},{"id":"SCL-44","revision":"11403dbfda8c","updated":"2026-10-27","name":"Cap serverless concurrency and measure cold starts","level":"Recommended","stack":["aws"],"rule":"Give every function a maximum number of copies running at once that fits the database connection budget. Measure cold start time, and keep warm copies only for routes whose speed objective a cold start breaks.","check":"Every function in the infrastructure code sets a maximum concurrency or instance count. That maximum times connections per copy stays within the connection budget. A report lists the 95th percentile cold start per function. Each function with warm copies has a note naming the objective a cold start broke.","check_type":"manual","url":"https://agentwranglers.se/playbook/scaling/load-balancing-and-autoscaling/serverless-concurrency","related":["/playbook/scaling/growing-the-database/connection-budget"],"sources":["https://docs.aws.amazon.com/lambda/latest/dg/configuration-concurrency.html","https://cloud.google.com/run/docs/configuring/max-instances"]},{"id":"SCL-45","revision":"344e4e3972ad","updated":"2026-10-27","name":"Queue model calls within the provider's rate limits","level":"Recommended","applies":["ai-features"],"rule":"Count the requests and tokens you send to each model provider per minute, and hold calls in a queue before they pass the provider's limit. On your own inference servers, scale on waiting requests, not on CPU.","check":"Under the load test at twice the planned peak, fewer than 1% of model calls get a 429. Interactive calls keep their speed objective. Self-hosted inference has an autoscaling rule on waiting requests with a minimum and a maximum.","check_type":"manual","url":"https://agentwranglers.se/playbook/scaling/load-balancing-and-autoscaling/model-rate-limits","related":["/playbook/ai-features/latency-cost-and-fallbacks/batch-offline-work","/playbook/ai-features/latency-cost-and-fallbacks/cost-per-call"],"sources":["https://developers.openai.com/api/docs/guides/rate-limits","https://platform.claude.com/docs/en/api/rate-limits"]}]}