Details
-
Bug
-
Status: Closed (View Workflow)
-
Major
-
Resolution: Fixed
-
2.5.9
-
None
Description
While setting lazy_connect=true helps, not to open connections to backend servers on session creation, one connection to backend server is always created at session end.
So if you have a high load of short-lived connections that can all be answered from a cache filter , e.g. session just doing one select that is answered from cache, the optimum would be not to open any backend connection at all.
Instead what happens is after the client already received its reply from the cache filter a backend connection is opened consuming cpu time on the backend server. First we were surprised by the load on the backend with the client getting the selected data so quickly. When we tried everything slowly with a sql command line client, and logging every connection and sql statement on the backend server we noticed that when leaving the session, a connection to the backend is made.
From looking at the source code we suspect that a QUIT packet gets routed to the backend, triggering opening the target connection.