Details
-
Bug
-
Status: Closed (View Workflow)
-
Trivial
-
Resolution: Fixed
-
2.4.18, 2.5.16, 6.1.4
-
None
Description
As described in MXS-3855, readwritesplit favors open connections when it decides where a request is routed to. This factor is currently at the value score + 5 * 1.5 which is a bit too aggressive as it results in a 40/60 split between two servers if a reconnection to the other must be done. Lowering the hard-coded multiplier value to somewhere around 1.1 seems to provide a better result while still favoring open connections in situations where the load is nearly equal.
This is a relatively minor adjustment as workloads that have short connection lifetimes almost always end up disregarding this factor but it does affect connections with long lifetimes (i.e. connection pools). The best solution for workloads that have long-lived connections would be to completely remove the bias value and open connections regardless of whether we have an open connection or not.