Simulated pool behaviour. Real sizing depends on database max_connections, query latency distribution, and application concurrency profile. Tuning a Spring Boot data layer? Get in touch.
max_connections, query latency, and concurrency — not by thread count. A common starting formula: connections = (cores × 2) + effective_spindle_count. More is not always better.SQLTransientConnectionException. This is your request latency ceiling under pool exhaustion. Set too low and you get cascading failures under brief spikes. Set too high and your HTTP request hangs. 3–5 seconds is typical.maximumPoolSize gives a fixed-size pool — recommended for consistent server workloads to avoid the overhead of pool resizing.leakDetectionThreshold to log a stack trace when a connection is held longer than expected. Invaluable for finding code paths that forget to close connections or hold them across slow external calls. Start at 2× your 99th-percentile query latency.About this demo
HikariCP is the default JDBC connection pool in Spring Boot. Rather than opening and closing a physical database connection on every request — an expensive operation that can take 20–100 ms — HikariCP maintains a pool of pre-opened connections that are lent to application threads and returned when the transaction completes. This simulator shows that lifecycle under load.
As request concurrency increases, the pool grows toward its configured maximum. When all connections are checked out, new requests wait in a queue. If they wait longer than the connection timeout, they receive a pool exhaustion exception. Tuning the maximum pool size, minimum idle connections, and timeout values is critical in high-throughput Spring Boot applications — too small and requests time out; too large and you exhaust the database's connection limit.