We have a React - Spring Boot application using Postgres, Hibernate, Jackson and Spring Data Rest.
After each application restart, the first call to a post route hitting one of our back-end servers is long (more than 4 seconds). Every subsequent call to the same route hitting each server is under 100 ms.
Our goal is to guarantee that none of our users is ever impacted by these slow calls after each redeployment.
We are considering triggering the calls automatically after each deployment so that the application "warms up" and our clients do not have the long calls.
Since there are several back-end servers behind a load balancer, we would like to trigger these calls directly from the back-end and not from a client.
We would like understand better what can be happening so that we to this more efficiently: could it be Hibernate? Spring lazy-loading beans? Jackson?
Hibernate L2 cache is not activated.
We expect to have the same fast response time each time (< 100 ms) instead of the initial 4s calls.