[MXS-3438] A question about maxscale weights mechanism Created: 2021-03-12  Updated: 2021-03-12  Resolved: 2021-03-12

Status: Closed
Project: MariaDB MaxScale
Component/s: readwritesplit, Router
Affects Version/s: 2.1.17
Fix Version/s: N/A

Type: Task Priority: Trivial
Reporter: Igor V. Lovalev Assignee: Unassigned
Resolution: Won't Do Votes: 0
Labels: None
Environment:

centos 6



 Description   

Sup, team! I have just a question about priority of servers with weight. For ex. i have config:

# servers
[ss_1]
type=server
address=mysql-ss-1.fr.local
port=3306
protocol=MySQLBackend
s_weight=0
 
[ss_2]
type=server
address=mysql-ss-2.fr.local
port=3306
protocol=MySQLBackend
s_weight=0
 
[ss_3]
type=server
address=mysql-ss-3.fr.local
port=3306
protocol=MySQLBackend
s_weight=0
 
[ss_4]
type=server
address=mysql-ss-4.fr.local
port=3306
protocol=MySQLBackend
s_weight=0
 
[ss_5]
type=server
address=mysql-ss-1.ms.local
port=3306
protocol=MySQLBackend
s_weight=1
 
[ss_6]
type=server
address=mysql-ss-2.ms.local
port=3306
protocol=MySQLBackend
s_weight=1
 
[ss_7]
type=server
address=mysql-ss-1.al.local
port=3306
protocol=MySQLBackend
s_weight=110

where ~99% of connections will be routed to mysql-ss-1.al.local and ~1% to mysql-ss-1.ms.local and mysql-ss-2.ms.local . When mysql-ss-1.al.local will be down, all of connections will be routed to mysql-ss-1.ms.local and mysql-ss-2.ms.local , and when they will be down too, all connections will be routed to other servers with weight 0. But what i should set to s_weight param, if i want to route 100% of connections to mysql-ss-1.al.local , then if it will be down, i want to route 100% of connections to mysql-ss-1.ms.local and mysql-ss-2.ms.local , and then if they will be down too, route 100% of connections to other servers ?



 Comments   
Comment by markus makela [ 2021-03-12 ]

If you want to ask questions about MaxScale, I'd recommend using the maxscale@googlegroups.com mailing list. The MariaDB Jira is for bug reports and feature requests.

In genera, the weight mechanism shouldn't be used for this purpose as it isn't smart enough. For a newer mechanism, you could upgrade to a recent MaxScale version and use the server rank feature.

Comment by Igor V. Lovalev [ 2021-03-12 ]

Hey, Markus, nice to see you again! Thx 4 ur answer!

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