Latency Budgets: How a Sub-100ms API Gets Split Across Each Hop
At QCon-style talk published by InfoQ, eBay staff engineer Saranya Vedagiri argues that API latency should be planned as a budget per hop, from edge and gateway to data access, with a buffer for delays.

TL;DR
- Treat latency as a budget: assign each hop in the request path its own time cap.
- Hidden costs such as TLS, DNS, serialization, cache misses and thread queuing usually cause the drift.
- Fewer network hops and measured budgets help teams hit targets more reliably than rewrites.
Why latency drifts
In a talk published by InfoQ, Saranya Vedagiri, a staff engineer at eBay, describes a common pattern: a service that runs at around 30 ms in normal conditions climbs to 60 ms at peak traffic and to 120 ms when a dependency slows down. Her point is that the code often has not changed. What changes is the friction around it: failing downstream services, retries, thread contention and queuing.
She compares this to the London Underground. A system diagram looks as simple as a tube map, but the real journey includes delays. When a downstream service slows, clients retry, a cache miss sends the request to the database, and each step adds time.
Splitting the request path into budgets
A latency budget is the gap between a target and what the design can actually deliver. Vedagiri uses a recommendation engine with a 50 ms target as an example. The budget does two jobs: it helps teams decide what is worth spending time on, and it gives product, engineering and QA a shared number to work toward.
Her rough allocation for an API that must answer in under 100 ms works like this:
- Edge layer, for TLS and initial routing: 10 ms, with no room to borrow.
- Gateway, for authentication and throttling: 5 ms.
- Application logic, which may be one microservice or several: 30 ms.
- Data access layer, the entity service that talks to the database: a share of the remaining time.
- Buffer: 10 to 15 ms, reserved for delays that always happen.
She also warns against splitting services too far. Each extra service adds a network hop, and those hops are easy to forget when counting time.
Where the time actually goes
Vedagiri walks through a typical request: client, edge, authentication, application logic, persistence, and the trip back, including response serialization. Several places can hide latency:
- Network hops, which bring TLS handshakes, connection pools and DNS lookups. She suggests that removing a hop can save more time than rewriting code.
- Synchronous fan-out, where one item request calls seller, feedback, review and image services. Teams need to decide which calls must be synchronous and which can run asynchronously.
- Payload size and serialization. Large JSON responses cost time to encode, and many clients often need only part of the data. She raises whether REST, GraphQL or gRPC fits each case; gRPC suits internal traffic, while JSON suits public APIs that people read.
- Cold caches. A miss at the wrong moment sends the request to the database.
- Query shape. Missing tuning or badly built constraints slow queries, and teams often find these only after going live.
- Queuing and contention. When a downstream service fails, queues grow and threads compete, which makes retries worse.
Measure before you trust the budget
The talk's outline ends with measurement, tradeoffs and future directions. Vedagiri's core message is that a budget without measurement is only a guess. Teams need to see how far each hop is from its cap, in normal load and at peak, before deciding where to optimize.
Why it matters
For backend and API developers, the practical takeaway is to write down a latency target per request path and assign each hop a share of it. Review network hops, synchronous calls, payload shape and cache behavior during design, not after launch. Keep a buffer for the delays you cannot predict, and measure latency at peak load, since averages hide the spikes that users notice. Teams that agree on these budgets early can make clearer decisions about which features to delay or simplify.
Sources
This article was written by Blozhik from the reporting below. Read the originals for full detail.
InPresentation: From Fan-Out to Fast: Sub-100ms API Design in Distributed SystemsInfoQKeep reading


