SoloMedium5m

The Timeout Cascade

#infrastructure-critical — 504 everywhere, CPU at 4%

Weather widget API blackholing connections — no timeout on fetch(). All 500/500 threads stuck waiting. Login, payment, and /health dead. 14-minute platform outage.

The trap: one 3rd-party widget with no timeout takes down the entire thread pool.

Your task

Fix `getWeatherWidget()` in `resilience_server.js`: `AbortController`, 2-second timeout, pass `signal` to blackholeFetch(), fail fast and free threads.

Book: await fetch · Prod: AbortController + graceful degradation without the widget.

Skills you'll prove

javascriptnodejsresiliencetimeoutsabort-controllerthread-poolobservabilitybook-vs-prod

Interview Tip

When asked how you prevent a slow downstream service from taking down your application, say: "If you don't set strict timeouts, a downstream network blackhole will eventually exhaust your thread or connection pool, taking down your entire app even if the failing service is only used for 1% of traffic. I solve this by implementing strict timeouts using context cancellation (like AbortController in Node or context.WithTimeout in Go). If the downstream doesn't respond in X milliseconds, we abort the socket, free the thread, and fail gracefully—often by serving a degraded UI without that specific widget."

Browse freely — sign in when you're ready to open a ticket and prove your skills.