The Anti-Latency Manifesto
A request may cross a load balancer, a runtime, a framework, a mapper, a pool, and a database before taking the same path back. Every stop spends part of the budget.
Seven boxes
Some requests are dominated by useful work. Others spend much of their time moving between representations and boundaries. A trace and a profile should decide which is which.
No single layer needs to be disastrous. Delay accumulates.
Managed memory can add processor work and unpredictable pauses. Interpreters and just-in-time runtimes can add warmup. Object mapping and repeated serialization allocate and copy data. Network boundaries add transport, queueing, timeouts, and retries. New instances load environments and warm state before they are useful.
Modern runtimes and platforms reduce many of these costs well. The costs still exist, and their combination matters more than any one of them. A request that depends on several results is limited by the slowest required one. More boundaries create more chances to encounter a slow path.
What the delay costs
Delay interrupts feedback and makes an interface feel uncertain. A button, a report, and a background job have different budgets, but each should have one.
Wide variation makes capacity planning and incident diagnosis harder. A system that is usually fast but occasionally stalls can feel worse than its average suggests. More processor time and open work per request also reduce the capacity of each machine. Architecture appears on the bill.
Start with the path
We begin with structural choices before tuning hot loops. Application code is compiled ahead of time. Internal modules communicate through local calls. Data moves through few representations, and startup work stays explicit.
These choices do not make performance automatic. Algorithms, storage, locks, and external systems can still dominate. They make the remaining work easier to see.
We measure real operations with their workload and environment attached. A performance number without that context is decoration.
Not every product needs the same response time, and developer productivity matters. Managed runtimes, remote services, and general frameworks can save more engineering work than their delay costs. We choose a different trade: removing a network boundary or a representation change is an architectural decision, not a hand-tuned instruction.
Measure the budget. Remove what does not serve the work.