Efficient web apps with Spring Boot 2
summary
An existing Spring MVC dashboard is rewired to use WebClient and Reactor (Mono/Flux, flatMap, zip) to run three remote calls in parallel instead of blocking, cutting the observed max endpoint latency from ~8s to ~447ms. Micrometer metrics are exported to Prometheus → Grafana for per-URI, outcome and instance graphs; a custom gauge reads a rate-limit header. A timeout 500ms fallback routes slow reverse‑lookup requests to a paid service. The changes measure, limit, and reduce tail latency successfully.
AI-written summary · about
chapters (14)
- 0:00Introduction and setup
- 1:04Servlet vs reactive stack
- 4:20Live coding introduction
- 7:59Optimizing with WebClient
- 14:06Parallelizing requests reactively
- 21:19Debugging slow requests
- 22:48Micrometer for metrics
- 27:13Analyzing response times
- 29:20Client-side metrics
- 31:12Timeout and fallback strategy
- 33:25Reactive streams under the hood
- 35:40Custom metrics with filters
- 38:51Rate limiting and recovery
- 39:14Q&A and resources
