HikariCP internals
On This Lesson 4 topics
This lesson is planned. The outline below lists the topics it will cover. The full lesson has not been published yet.
In this lesson
know how HikariCP lends and manages connections.
Planned topics
- HikariCP is the default pool in Spring Boot.
getConnection()takes an idle connection or waits up toconnectionTimeout; then it throws.- Connections are validated and retired after
maxLifetime(set below any database or proxy limit) andidleTimeout(only relevant whenminimumIdle < maximumPoolSize). close()on a pooled connection returns it to the pool; it does not close the socket.- Metrics (active, idle, pending, timeouts) are exposed through Micrometer.
Draft outline details
Demonstration
spring:
datasource:
hikari:
maximum-pool-size: 10
connection-timeout: 3000
max-lifetime: 1500000Verify property names and defaults for your Boot version before recording.
Check your understanding
What does close() do on a pooled connection?
Show answer
Returns it to the pool.
Practice
Apply this lesson with the module's lab, exercises and quiz.
Marking a lesson complete is optional and you can undo it any time. Your progress stays in this browser.