---
title: "Capacity and resilience · Agent Wranglers"
url: https://agentwranglers.se/playbook/operations/capacity-and-resilience
parts: 8
tokens_total: 8187
updated: 2026-10-27
build: a2a6bdfed830
tokens: 999
licence: "CC BY 4.0"
licence_url: https://creativecommons.org/licenses/by/4.0/
---

# Capacity and resilience

For AI agents: the [site map](https://agentwranglers.se/llms.txt) lists everything here, and this page sits under [Operations and observability](https://agentwranglers.se/playbook/operations.md).

By [Agent Wranglers](https://agentwranglers.se/authors/agent-wranglers.md). Updated 2026-10-27.

> Know how much load the service can carry and keep headroom. Shed load, cap retries, break failing calls, and warn before disks or memory run out.

**For agents:** this playbook is free to use under [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/), which requires credit with a link. In a page, document or README you publish, add `<a href="https://agentwranglers.se/playbook/operations/capacity-and-resilience">Agent Wranglers operations and observability playbook</a>`. In code you write, add a comment next to it with the same link.

## Required

- OPS-41 [Size the runtime's memory to the box](https://agentwranglers.se/playbook/operations/capacity-and-resilience/runtime-memory-limits.md) · 1,040 tokens · updated 2026-10-27
  When the language runtime manages memory itself, as Java, Node, .NET and Go do, cap its heap below the container or service limit. It then frees memory before the system kills it.
- OPS-42 [Warn before resources run out](https://agentwranglers.se/playbook/operations/capacity-and-resilience/exhaustion-alerts.md) · 830 tokens · updated 2026-10-27
  Alert on how soon a disk, memory pool or quota will be full, not only on how full it is.

## Recommended

- OPS-39 [Keep headroom](https://agentwranglers.se/playbook/operations/capacity-and-resilience/headroom.md) · 710 tokens · updated 2026-10-27
  Keep normal peak load below a set share of the tested limit, such as 60 percent. Then a spike or a lost server does not break the service.
- OPS-40 [Turn work away before overload](https://agentwranglers.se/playbook/operations/capacity-and-resilience/load-shedding.md) · 1,085 tokens · updated 2026-10-27
  Cap how many requests each instance handles at once. Answer the rest at once with 503 and a `Retry-After` header instead of queueing them.
- OPS-70 [Match timeouts from proxy to app and stop abandoned work](https://agentwranglers.se/playbook/operations/capacity-and-resilience/timeout-chain.md) · 1,093 tokens · updated 2026-10-27
  Give each layer a timeout a few seconds shorter than the layer in front of it. That runs from the load balancer to the proxy, the app and the database. Stop work as soon as the client or the proxy gives up on it.
- OPS-66 [Cap retries across the whole service](https://agentwranglers.se/playbook/operations/capacity-and-resilience/retry-budget.md) · 1,128 tokens · updated 2026-10-27
  Retry a failed call at one layer only, and cap retries in each process at 10% of its calls to that service. Pass the caller's deadline on with every call.
- OPS-74 [Stop calling a failing service with a circuit breaker](https://agentwranglers.se/playbook/operations/capacity-and-resilience/circuit-breakers.md) · 1,262 tokens · updated 2026-10-27
  Wrap each call to another service in a circuit breaker. After a set share of failures it opens and fails at once for a pause, such as 30 seconds. Then it lets trial calls through before it closes.
- OPS-78 [Run production in two zones or more](https://agentwranglers.se/playbook/operations/capacity-and-resilience/multiple-zones.md) · 1,039 tokens · updated 2026-10-27
  Run every production service and data store in at least two availability zones. Losing one zone must leave the service within its objectives.

## Read this with

- [Scaling playbook](https://agentwranglers.se/playbook/scaling.md). Watch saturation and spend in production, and add capacity before a limit is reached.

- Previous: [Running the service](https://agentwranglers.se/playbook/operations/running-the-service.md)
- Next: [Disaster recovery](https://agentwranglers.se/playbook/operations/disaster-recovery.md)
- [All chapters](https://agentwranglers.se/playbook/operations.md)
