READ only database coherency fix

The document mentionned that we could use
 the rest of nodes as read only nodes, however the
 configuration suggest to use only one.

Change-Id: I418cd0e0bd00b093356ecca3d949e5ad44ba260e
This commit is contained in:
Florian LEDUC 2022-11-15 10:04:32 +00:00
parent 569d22ee01
commit 9646979e7b
1 changed files with 4 additions and 4 deletions

View File

@ -112,11 +112,11 @@ If you choose to run haproxy for this, you can use something like the following
listen db_slave listen db_slave
bind 0.0.0.0:3308 bind 0.0.0.0:3308
balance first balance roundrobin
option mysql-check option mysql-check
server server-1 server-1.with.the.fqdn check inter 5s downinter 15s fastinter 2s resolvers cluster backup id 3 server server-1 server-1.with.the.fqdn check inter 5s downinter 15s fastinter 2s resolvers cluster id 3 backup
server server-2 server-2.with.the.fqdn check inter 5s downinter 15s fastinter 2s resolvers cluster id 1 server server-2 server-2.with.the.fqdn check inter 5s downinter 15s fastinter 2s resolvers cluster id 1 weight 10
server server-3 server-3.with.the.fqdn check inter 5s downinter 15s fastinter 2s resolvers cluster backup id 2 server server-3 server-3.with.the.fqdn check inter 5s downinter 15s fastinter 2s resolvers cluster id 2 weight 10
By using two blocks, we can separate the ``read`` only SQL requests (listening on port 3308 here) from ``read/write`` By using two blocks, we can separate the ``read`` only SQL requests (listening on port 3308 here) from ``read/write``
requests (listening on port 3306 here) and lower down a little bit the load on the first (master) mysql backend. requests (listening on port 3306 here) and lower down a little bit the load on the first (master) mysql backend.