Learn
HTTP performance, explained.
Short, practical guides to diagnosing slow requests — what the numbers mean, what healthy looks like, and how to find the phase that’s actually costing you time.
- Why is my API slow locally?
The usual suspects when localhost feels slow: IPv6 DNS resolution, missing keep-alive, dev-mode framework overhead, cold caches, and small local DB pools — and how to tell them apart.
- What is a good TTFB?
Realistic time-to-first-byte budgets for APIs by environment — loopback, LAN, and remote — plus why the popular 800ms web guidance doesn't apply to API endpoints.
- TTFB vs latency: what's the difference?
Latency is the network round trip; TTFB includes it plus your server's thinking time. How the two relate, and which one to optimize when.
- Connection pool exhaustion: symptoms and diagnosis
Fast for one request, slow under load, timeouts at peak: how an exhausted database connection pool behaves, and the bimodal latency signature that identifies it.
- Bimodal latency distribution: what two peaks mean
When response times cluster into a fast group and a slow group, an average lies to you. What causes two-peaked latency — cache misses, pool waits, cold starts — and how to detect it.
- Server-Timing header examples (Express, Django, Rails, Next.js)
Copy-paste Server-Timing middleware for the major frameworks, so any client or profiler can split time-to-first-byte into db, render, and cache segments.
- How to measure DNS, TCP, and TLS time
Three ways to break a request into connection phases — curl -w, browser DevTools, and a local profiler — and what each phase should cost.
- Is it my API or the third-party that's slow?
How to attribute page latency between your own endpoints and external dependencies like Stripe or OpenAI — per-host timing, dependency budgets, and the keep-alive trap.