-
Notifications
You must be signed in to change notification settings - Fork 874
Description
At the moment DISCARD ALL is written to the write buffer when you close a pooled connection, didn't set No Reset On Close, didn't turn on multiplexing, and have no prepared statements, but it isn't actually sent to the server before sending the next command on this connection (to save a round trip).
In scenarios where the connection pool isn't saturated it might be worth sending the command asynchronously when the connection is sent to the pool and hope that everything is done when it is handed over again.
In this case this might decrease latency for the next command being sent.
In other cases (when the pool is saturated) the additional round trip will obviously hurt performance and add some somewhat unpredictable latency to opening new pooled connections.
It might be worth investigating the performance impact of this under different loads.