4 ms·
Then what does this mean for consensus algorithm like raft? Wouldn’t you need to power cycle disks and read back what you just wrote to ensure it actually got w
by pyrolistical 3y ago
Then what does this mean for consensus algorithm like raft? Wouldn’t you need to power cycle disks and read back what you just wrote to ensure it actually got written and not just buffered?
- vlovich123 3y agoYou’ll always get back what you wrote even if it wasn’t written durably. It’s kind of how that works. With consensus you make the following kind of argument: 1. The kind of drives you’re using if you’re running a distributed consensus in production is going to be enterprise where these kind of games are played a lot less 2. Establishing consensus is time consuming - by the time peers ack it, you will have flushed to disk. In a common 3 replica scenario, that means 1/3 nodes is taken care of. 3. The probability of 2 disks failing simultaneously in ways that cause a problem is pretty small. But yeah, if your concensus has to be durably written and your flash controller is lying to you, your concensus is worthless (even reading what you wrote isn’t good enough because again - controller can lie to you and satisfy reads from the buffer too)
- mmis1000 3y agoI think most modern disks just never design with sudden power-lost safety in mind (some enterprise disks do have such guarantee, by adding a battery or a capacitor to buy time for properly flush the cache to disk). A disk AND an UPS is probably the minimal combination that you can guarantee that your data is actually persisted.