Skip to content
Ameen Abozaid
Planned lessonMID-017-L02

HikariCP internals

  • Lesson 2 of 5
  • Mid-level
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 to connectionTimeout; then it throws.
  • Connections are validated and retired after maxLifetime (set below any database or proxy limit) and idleTimeout (only relevant when minimumIdle < 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

yaml
spring:
  datasource:
    hikari:
      maximum-pool-size: 10
      connection-timeout: 3000
      max-lifetime: 1500000

Verify 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.

Lab and exercises Quiz

Marking a lesson complete is optional and you can undo it any time. Your progress stays in this browser.

Continue to next lesson

Type to search levels, phases, modules and lessons.