API performance, cost and HTTP guides — API Bench
Thirty guides: capacity, latency, cost, rate limits and headers.
- Capacity planning with Little's LawTurn a target request rate and three latency percentiles into the concurrency, threads and instances an API actually needs.
- Tail latency: why P95 and P99 decide your timeoutAverages hide the requests that hurt. How to read percentiles, calculate what they cost, and set timeouts that do not cut off healthy traffic.
- Retry storms: how a 1% error becomes 300% loadRetries are new traffic. Calculate the amplification, recognise the cliff, and design retry budgets that fail politely.
- REST vs GraphQL: measuring the payload differenceOver-fetching, under-fetching and query text all show up in the bytes. A practical way to compare the transfer volume of both designs.
- API egress cost: the arithmetic behind the invoiceHow call volume, payload size, compression and cache hit rate become a monthly transfer bill, and where the cheapest savings are.
- JSON compression ratios you can plan withWhat gzip and brotli actually achieve on API responses, how to measure it, and when compression is the wrong optimisation.
- Token bucket vs sliding window: choosing a rate limiterHow the two common rate-limit algorithms behave under burst, what clients experience, and how to simulate the difference.
- Exponential backoff with jitter, without the guessworkBase, multiplier, cap and jitter strategy explained with numbers, plus the retry timeline a client actually produces.
- Choosing HTTP status codes without arguingA decision table for the codes that matter in APIs, including the ones teams confuse: 401 vs 403, 409 vs 422, 502 vs 504.
- Cache-Control patterns that survive productionPublic, private, s-maxage, stale-while-revalidate and immutable: which combination fits which API response.
- HSTS and preload: a checklist before you commitWhat Strict-Transport-Security changes, why preload removal takes months, and the order to roll it out safely.
- CSP for API frontends: a policy that does not breakHow to build a Content-Security-Policy that blocks injected script without blocking your own app, in the order that keeps it working.
- Connection pool sizing without superstitionWhy a bigger pool is often slower, how pool size relates to concurrency, and how to find the number your database can take.
- Timeout budgets and deadline propagationHow to split one user-facing deadline across several internal calls so no dependency can consume the whole budget.
- Building a one-page capacity sheet from your SLOA repeatable template that connects the SLO, the traffic model, the fleet size and the monthly cost on a single page.