Spring Boot and Java deep dives
API Failure Lab
A Spring Boot API built to break, where every failure mode is reproducible, observable with real tools, and paired with a fix.
View code on GitHubProblem
I wanted hands-on practice finding why an API fails or slows down, the way it happens in a real incident, not just reading about it.
Goals
Every scenario is:
- Reproducible: a
/brokenendpoint and a k6 load script - Observable: Grafana dashboards, thread dumps, heap dumps, and
pg_stat_activity - Paired with a fix: a
/fixedendpoint under the same load - Documented: Symptom → Reproduce → What you’ll see → Diagnose → Root cause → Fix → Takeaway
Constraints
- Real dependencies (Postgres and an HTTP service in Docker) and real network faults through Toxiproxy
- No
Thread.sleep()fakes, so connection pools, socket timeouts, and TCP behave as they do in production
Changelog
- 2026-09-28: Planned, built in phases, reviewed, and review findings fixed