Beyond the Spinning Wheel: Building Robust and Resilient APIs
summary
Loads a Spring + Kotlin API with Gatling and a simple RestTemplate client and shows concrete numbers: a 5% external timeout inflates median latency to 19s (50th), 36s (75th), 52s (95th) and produces ~400–500 waiting requests, while enabling Java virtual threads drops 75th to ~85ms and 95th to ~5s. Implementing a 5s client timeout yields ~770ms 95th. Adding client-side rate limiting cuts median from 27s to ~2.66s and limits concurrent waiters to ~30. Patterns: timeouts, fail-fast rate limits, circuit breakers; tools: Gatling, virtual threads, Resilience4j/Polly/express-rate-limit.
AI-written summary · about
chapters (13)
- 0:00Introduction and story
- 4:04Go to production early
- 10:05Web service concurrency models
- 14:40Root cause analysis
- 17:27Demo setup and code
- 21:07Load testing simulation
- 23:55Impact of timeouts on performance
- 26:27Solutions for timeouts
- 29:43Rate limiting issues
- 31:49Rate limiting solutions
- 33:58Circuit breaker pattern
- 35:49Libraries and references
- 36:11Key takeaways and Q&A
