advancedScenario-Based & System Design Questions
A service exhibits high latency only for the first request after being idle for a while, then performs normally.
This is typically a cold-start effect — connection pools, JIT warm-up (for JVM-based apps), or lazy-loaded caches/resources initializing on first real use rather than at startup. Diagnose by comparing cold vs. warm request timing directly, and mitigate with readiness probes that don't mark the service ready until a warm-up routine completes, or a startup-time warm-up request/script that pre-triggers the slow initialization before traffic is routed to the instance.
Ready to master this question?
Generate a complete walkthrough — background, the full answer in plain language, a working code example explained line by line, a real-world scenario, common mistakes, and how this same question gets asked in different ways.
Sign in to generate a response