Galera cluster in a single master configuration - slave queue size setting

962 views
Skip to first unread message

Eric Feldhusen

unread,
Apr 21, 2014, 4:21:34 PM4/21/14
to codersh...@googlegroups.com
Due to how my application is designed, I'm running my Galera cluster fronted by HAProxy as a single master with multiple members for fail-over.

I want to try adjusting my slave queue size setting and I just wanted to check and see if that setting is just applied on the master, the slaves or all members?  I'm guessing all cluster members, since any one of them could become the master at a time.
 
wsrep_provider_options = "gcs.fc_limit = 256; gcs.fc_factor = 0.99; gcs.fc_master_slave = yes"

Eric Feldhusen

dirtysalt

unread,
Apr 22, 2014, 4:04:43 AM4/22/14
to codersh...@googlegroups.com

On Tuesday, April 22, 2014 4:21:34 AM UTC+8, Eric Feldhusen wrote:
Due to how my application is designed, I'm running my Galera cluster fronted by HAProxy as a single master with multiple members for fail-over. 

So you run multiple-nodes galera cluster, and use HAProxy in front of cluster as sort of load balancer. Am I right?

I want to try adjusting my slave queue size setting and I just wanted to check and see if that setting is just applied on the master, the slaves or all members?  I'm guessing all cluster members, since any one of them could become the master at a time.

But to galera clutser, there is no slave. All nodes are master which accepts read and write both. 

You said "adjust my slave queue size setting", you mean change the setting on one node, and you want to check and see if this setting is applied just on the node, or on all nodes, right ? 

Eric Feldhusen

unread,
Apr 23, 2014, 4:02:54 PM4/23/14
to codersh...@googlegroups.com
On Tue, Apr 22, 2014 at 4:04 AM, dirtysalt <dirtys...@gmail.com> wrote:

On Tuesday, April 22, 2014 4:21:34 AM UTC+8, Eric Feldhusen wrote:
Due to how my application is designed, I'm running my Galera cluster fronted by HAProxy as a single master with multiple members for fail-over. 

So you run multiple-nodes galera cluster, and use HAProxy in front of cluster as sort of load balancer. Am I right?

Correct
 
I want to try adjusting my slave queue size setting and I just wanted to check and see if that setting is just applied on the master, the slaves or all members?  I'm guessing all cluster members, since any one of them could become the master at a time.

But to galera clutser, there is no slave. All nodes are master which accepts read and write both. 

Correct, my mistake for the wrong terminology.
 
You said "adjust my slave queue size setting", you mean change the setting on one node, and you want to check and see if this setting is applied just on the node, or on all nodes, right ? 

Yes, I wanted to know if I had to apply this setting to just the one node receiving all the application writes and reads or apply to all cluster nodes, since at any time, the HAProxy could failover to any one of them.
 

yan.zhang

unread,
Apr 24, 2014, 12:57:36 AM4/24/14
to codersh...@googlegroups.com
OK. So your deployment is one node(master) for all application reads and writes, and other nodes(slaves) stand by just for failover and don't accept and reads or writes. Right?

I think you should apply this setting to all cluster nodes. But not because of the reason that "HAProxy could failover to any one of them". This setting mainly affects "other nodes"(slaves). 

For example, you have three nodes, A(master, fc_limit = 256), B(slave, fc_limit = 256), C(slave, fc_limit = 32). So when you commit transaction to A, trx will be replicated to B, C synchronously. But since C's slave queue capacity is much smaller and will be full much earlier than A,B, it will feedback to A that "I can not accept trx any more" and make cluster replication stop. Then you can not commit transaction to A until C's slave queue is not full. 

Simply speaking: flow control makes replication stop, and therefore makes writes (which are synchronous) stop, on all nodes until flow control is relaxed.

Reply all
Reply to author
Forward
0 new messages