Connection pooling and HikariCP: internals, settings and sizing
Why connection pools exist, how HikariCP waits for a connection (ConcurrentBag), the settings that matter (maximumPoolSize, connectionTimeout, maxLifetime, keepaliveTime, leakDetectionThreshold), sizing with the formula and Little's Law, PgBouncer transaction pooling, @Transactional holding connections, virtual threads, HTTP client pools and the metrics to watch, with a JDK 21 experiment measured in numbers.