diff --git a/doc/source/journey/configure/database.rst b/doc/source/journey/configure/database.rst index 3679244..02e60bd 100644 --- a/doc/source/journey/configure/database.rst +++ b/doc/source/journey/configure/database.rst @@ -112,11 +112,11 @@ If you choose to run haproxy for this, you can use something like the following listen db_slave bind 0.0.0.0:3308 - balance first + balance roundrobin 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-2 server-2.with.the.fqdn check inter 5s downinter 15s fastinter 2s resolvers cluster id 1 - server server-3 server-3.with.the.fqdn check inter 5s downinter 15s fastinter 2s resolvers cluster backup id 2 + 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 weight 10 + 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`` requests (listening on port 3306 here) and lower down a little bit the load on the first (master) mysql backend.