Size the API before traffic does
Four calculators that turn request rates, latency percentiles, payload sizes and rate-limit rules into the numbers you actually need: concurrency, instances, monthly egress, retry load and the exact headers to send.
No account, no upload and no API calls — every figure is computed in this tab and kept on this device.
- 4calculators
- 30in-depth guides
- 0uploads
- 1xx–5xxstatus reference
Capacity
Convert target RPS and latency percentiles into concurrency, threads, instances and retry load.
Concurrency per percentile
Required concurrency L = λ × W
Payload & egress
Compare REST and GraphQL transfer volume and the monthly cloud bill that follows from it.
Monthly transfer: REST vs GraphQL
Monthly transfer
Rate limit & backoff
Watch a token bucket under load and see how 429s and retries reshape the request timeline.
Token bucket level and throttled seconds
| Attempt | Delay | Cumulative wait |
|---|
Status & headers
Search HTTP status codes and compose cache, transport-security and content-security headers.
| Code | Reason phrase | Class | Retry | Cacheable | When to use |
|---|
Header builder
Cache-Control
Strict-Transport-Security
Content-Security-Policy
Other response headers
How to use the four tools
Each tab is independent. Start with the number you are least sure about and read the change in the result cards underneath.
- Little's Law capacity model with P50/P95/P99 concurrency, thread and instance counts
- REST vs GraphQL payload, cache-hit and cloud egress cost comparison
- Token bucket and sliding window simulator with 429 retry timelines
- Exponential backoff with full, equal and decorrelated jitter
- RFC 9110 status codes plus Cache-Control, HSTS, CSP, CORS and Retry-After builder
- Every calculation runs locally — nothing leaves the browser
Frequently asked questions
Does API Bench send my numbers anywhere?
No. Every calculation runs as JavaScript in this tab. There is no account, no analytics and no request to any server; the only external resource is the ad loader, which is skipped on localhost, 127.0.0.1 and file:// hosts.
What is Little's Law and why use it for capacity?
Little's Law says the average number of requests in a system equals arrival rate multiplied by time in system: L = λ × W. With λ in requests per second and W in seconds, L is the concurrency you must hold. It holds for any stable system, which is why it converts RPS and latency into threads and instances so reliably.
Which cloud egress prices are used?
The default is 0.085 USD per GB, the list price for the first 10 TB per month from major CDN and object-storage egress. The field is editable, so you can use your own contract, committed-use or inter-region rate.
Are the status codes and headers current?
The reference follows RFC 9110 and the IANA HTTP status code registry, including 103 Early Hints, 421, 425, 428, 429, 451 and 511. Header guidance follows RFC 9111 for caching, RFC 6797 for HSTS and the CSP Level 3 directive list.
How faithful is the rate-limit simulation?
It is a deterministic token bucket at one-second granularity with a refill you set, followed by a retry queue using the chosen backoff and jitter. It shows the shape of a retry storm well, but it does not model network variance, multiple clients competing for one bucket, or server-side queueing.
Guides
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.