APIs & Data Fetching — Senior Interview Prep
The other half of a fullstack interview: how the client consumes APIs. Choice of protocol, request lifecycle, caching layer, optimistic UX, real-time channels, and the failure modes that only show up under flaky networks and concurrent users.
Files
What a senior is expected to frame
- Server state ≠ client state. Server-fetched data has a cache, a freshness model, a refetch schedule, and rules for when it’s stale. Treat it differently from local UI state — most “Redux complexity” disappears once you separate the two. See State Management — Senior Interview Prep for the state-management side.
- Failure is the design. Network requests fail. Servers throw 5xx. Users double-click. Tabs sleep mid-request. The interview answer always names: timeout, retry policy (and which methods are retryable — see HTTP Semantics and Caching), idempotency, abort, and the UX during each.
- Latency budget shapes architecture. A typeahead has a different budget than a checkout. Pagination strategy, debounce, prefetching, optimistic UX — all flow from the budget.
Cross-references
- HTTP semantics, status codes, caching (
Cache-Control/ETag): HTTP Semantics and Caching - HTTP versions and HOL blocking: HTTP Versions — 1.0, 1.1, 2, 3
- Resilience patterns (backend): Resilience