FREE The web stack LESSON · The web stack
Spend the latency budget
Caching, rendering, and degraded experience
Performance is an end-to-end allocation problem.
A user-visible deadline is consumed by input delay, main-thread work, network handshakes, server queues, computation, storage, transfer, rendering, and layout. Caches can remove work but introduce freshness and invalidation contracts. Prioritize the critical path, stream useful state, precompute stable work, and measure real-user tails rather than a warm local average.
Every cache exchanges repeated work for a coherence problem.
Fast failure can be better than slow fiction.
When a dependency exceeds its budget, the product can block, degrade, serve stale state with a label, or omit a feature. The correct choice depends on user harm and data semantics. A checkout total and a recommendation carousel should not share the same fallback contract.
Graceful degradation is a product decision encoded in technical boundaries.