brettwooldridge / HikariCP

光 HikariCP・A solid, high-performance, JDBC connection pool at last.
Apache License 2.0
20.01k stars 2.93k forks source link

First getConnection spend much time #1758

Closed raizoor closed 3 years ago

raizoor commented 3 years ago

Hi team,

I have a java springboot API running into a Kubernetes pods, that have an elevated requests per second. Using dynatrace introspection, I can see getConnection cost between 1s and 10s when a scale up a new POD. But before some slowless seconds, my requisitions are finished in 40ms (median). My configurations:

Here, have an dynatrace evidence: hikari

Obs: I already have make a warm up with "fake" querys, before java startup.

Here, you can see cleary when a new pod scale up. image

Anyone can help me decrease or at least understand this initial time?

Thank you !!

brettwooldridge commented 3 years ago

@raizoor With respect to the graph, what exactly is being measured? Response times for the new pod? Response times as measured from the front end?

When a new pod comes online, clearly there is a startup time, what is the trigger that says the pod is alive and ready to accept requests?

raizoor commented 3 years ago

@brettwooldridge The graph is about time to response to the all test, no only my new pods. It hit directly on backend (all in intranet).

Nowadays, we use the default spring actuator, so Kubernetes stay hit then until it response an 200 to consider " a live pod". Basecly, when Java says "i'm up", Kubernetes send traffic to this pod too.

brettwooldridge commented 3 years ago

Set the system property com.zaxxer.hikari.blockUntilFilled=true.