[MXS-3880] Bias value for open connections is too large Created: 2021-11-16  Updated: 2022-01-13  Resolved: 2021-11-17

Status: Closed
Project: MariaDB MaxScale
Component/s: readwritesplit
Affects Version/s: 2.4.18, 2.5.16, 6.1.4
Fix Version/s: 6.2.0

Type: Bug Priority: Trivial
Reporter: markus makela Assignee: markus makela
Resolution: Fixed Votes: 0
Labels: 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.



 Comments   
Comment by markus makela [ 2021-11-17 ]

Removed the bias value for open connections. Now the load balancing algorithm will balance the load equally over long periods of time.

Generated at Thu Feb 08 04:24:37 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.