Spring off the HTTP High Dive into an Optimized Connection Pool
summary
Compares Spring HTTP clients and shows concrete defaults, tunables and failures: Reactor Netty (default 500) exposes TCP+TLS handshake metrics that measure connection creation averaging ~150 ms in the demo, while Apache HTTPClient (25 total, 5 per route) uses per-host limits and needs explicit TTL/idle settings. Demonstrates Micrometer + Prometheus metrics, an AspectJ timer for Apache connect time, and two failing patterns: creating a RestClient per request (leaks sockets) and servers sending Connection: close (forces hundreds of new connects). Provides bean configs that fix timeouts, TTLs and eviction so pooling actually works.
AI-written summary · about
