3 ms·
If you are envisioning network partition scenarios where perhaps the master is isolated from the slaves, this is minimized by replication checks to slaves (set
by aphyr 14y ago
If you are envisioning network partition scenarios where perhaps the master is isolated from the slaves, this is minimized by replication checks to slaves (set an arbitrary key to an arbitrary value and check if the slaves update). If a master is isolated we block writes: Consistent and Partition tolerant at the cost of Availability.
Could you describe these checks in more detail, please?
- courtneycouch0 14y agoBasically it goes something like this (oversimplifying): hset('shard.healthcheck', checkId, token) wait 500ms on every slave hget('shard.healthcheck', checkId) Verify the tokens match. Slaves are removed from the pool when the tokens don't, and allowed back in when the tokens match. Writes to master is disabled if a x/2 slaves are not available (where x is the number of slaves).