[MXS-588] weightby and readwritesplit not working as expected Created: 2016-02-24 Updated: 2016-02-25 Resolved: 2016-02-25 |
|
| Status: | Closed |
| Project: | MariaDB MaxScale |
| Component/s: | readwritesplit |
| Affects Version/s: | 1.3.0 |
| Fix Version/s: | 1.3.0 |
| Type: | Bug | Priority: | Minor |
| Reporter: | Frederic -lefred- Descamps | Assignee: | markus makela |
| Resolution: | Not a Bug | Votes: | 0 |
| Labels: | None | ||
| Environment: |
CentOS 6.7 |
||
| Description |
|
one master: percona1 I've configured weithby to load balance the requests 90% and 10%, but they are always spread in 50% each:
I expect to have 90% and 10% of operations like showed in the target, or do I miss something ? Thank you, |
| Comments |
| Comment by markus makela [ 2016-02-25 ] |
|
Depending on the command it could be executed on all backend servers if the query changes the session state. This means that USE ..., SET autocommit=1 etc. are executed on all backend servers which could explain this behavior. Please try to do plain select queries like SELECT 1 to see if that causes the distribution to shift |
| Comment by Frederic -lefred- Descamps [ 2016-02-25 ] |
|
Hi Markus, In fact you replied me yesterday on IRC, setting {{router_options=slave_selection_criteria=LEAST_GLOBAL_CONNECTIONS resolved it. Maybe the documentation should be more explicit on how weightby is working with the default slave_selection_criteria |
| Comment by markus makela [ 2016-02-25 ] |
|
Yes, it should be made absolutely clear that the current mechanism uses statement instead of connections for the load balancing. I'll close this as not a bug. |