Cascading failure debugging lab. Recommendations are an optional carousel at the bottom of the page. When they broke, the whole homepage went down with them.
Practice debugging a cascading failure in a live, broken production system in your browser, with HTTP microservices. Find the root cause in the logs, terminal and code, fix it, and a load test checks that the fix holds under real traffic.
1. The Incident Context
At 19:30 the recommendations service (recs) started failing after a bad model push. Recommendations are a "nice to have" carousel at the bottom of the homepage, yet the homepage itself went down for 25 minutes. The recs team rolled back, and the homepage took another 5 minutes to recover after that.
2. Observed Symptoms & Metrics
- Affected Endpoints / Components:
GET /home?user={id} on the homepage aggregator. It builds the page from three services: GET localhost:9300/for/{userId} (recs), GET localhost:9400/featured (catalog) and GET localhost:9500/active (banners).
- Behavior: While recs is healthy,
/home answers in about 40 ms. Once recs stops answering, every /home request takes about 9 seconds and then returns 500, even though catalog and banners are healthy and fast. In this environment recs fails on and off: it answers for 40 seconds, then hangs for 40 seconds.
- Error Rate: Over 90% of
/home requests fail at the 5 s gateway timeout while recs is down.
- System Metrics: Aggregator CPU is low. Recs receives several times more requests per second than the homepage does while it is failing, and none of them succeed.
3. Application Logs
2026/10/12 19:30:00 homepage aggregator listening on :8080
2026/10/12 19:30:06 recs for user 4412: context deadline exceeded (attempt 1/3)
2026/10/12 19:30:09 recs for user 4412: context deadline exceeded (attempt 2/3)
2026/10/12 19:30:12 recs for user 4412: context deadline exceeded (attempt 3/3)
2026/10/12 19:30:12 GET /home 500 9.004s
# curl localhost:9300/stats
{"hanging":true,"inbound_rps":176,"max_inbound_rps":181,"mode":"cycle","success_rps":0}
# k6
http_req_failed................: 91.37%
http_req_duration..............: avg=4.12s p(99)=5.00s
4. Your Objective
Step into the live environment while synthetic traffic is running, find the root cause, and patch the code.
To clear this stack, your fix must pass these checks under a 90-second load test at 60 req/s, where recs hangs completely (no response at all) from second 20 to second 50 and is healthy otherwise:
- Error Rate: Fewer than 1% of
/home requests fail (http_errors < 1%).
- Performance: P99 latency stays below 500 ms for the whole test, outage included (
p99_latency_ms < 500).
- Data Integrity: Every page includes the featured products and banners. While recs is down, pages return
"recommendations": [] and "degraded": true. Whenever recs is healthy (from 10 seconds after it recovers), at least 95% of pages include the user's real recommendations again (recs_missing < 5%), and recs never receives more than 72 requests in any one second (max_recs_rps <= 72).
Toolbox: curl 'localhost:8080/home?user=7', curl -X POST localhost:9300/chaos -d '{"mode": "hang"}', curl -X POST localhost:9300/chaos -d '{"mode": "ok"}' (or "cycle" to go back to failing on and off), curl localhost:9300/stats, time curl -s -o /dev/null 'localhost:8080/home?user=7'. Save a file in the editor to rebuild and restart the app. Click Verify when you think it's fixed.
Terms in this lab: recs (recommendations), req/s (requests per second), p99 (99% of requests finish faster than this), 500 (HTTP Internal Server Error), gateway timeout (the edge gives up waiting and fails the request), degraded (the page is served without an optional part).
You can browse stacks without an account. To run labs you sign in with your email or Google account. BustedStack uses your email address to
sign you in, and your name and profile picture to show your account and pre-fill certificates. We never access your Gmail, contacts or Drive,
sell your data or run ad trackers.
This site needs JavaScript to run labs.