Fast, lightweight JDBC connection pool for Java
open sourceApache-2.0free
HikariCP is a production-ready JDBC connection pool for Java, about 165 KB with no overhead it can avoid, built for speed and reliability. It keeps idle connections alive, retires them after a maximum lifetime, detects connection leaks, and can report metrics and health checks to Dropwizard's registries. The current releases need Java 11 or later; older artifacts for Java 8, 7 and 6 are deprecated.
Problems it solves
- pool database connections in my Java service without the pool becoming the bottleneck
- find JDBC connections my code leaks and never returns
- keep database connections healthy through firewalls that drop idle ones
Features
- JDBC connection pool of about 165 KB
- Keepalive for idle connections and a maximum connection lifetime
- Connection leak detection with a configurable threshold
- Metrics and health checks through Dropwizard registries
- Benchmarked with JMH against other pools
Limitations
- The pool can drop to zero connections and fail to recover unless TCP keepalive is configured in the JDBC driver or the operating system.1
