4 ms·
Litestream flushes out changes to S3 on an interval. By default, it’s every 10 seconds although you could reasonably drop that down to 1 second. You could go lo
by benbjohnson 5y ago
Litestream flushes out changes to S3 on an interval. By default, it’s every 10 seconds although you could reasonably drop that down to 1 second. You could go lower if you’re replicating to NFS.
That interval determines your window for data loss in the event of a catastrophic failure (e.g. disk failure). I’ve run multiple DigitalOcean machines for years and have never had a catastrophic failure so they are rare events but they can happen.
Dqlite and rqlite run every write through a distributed consensus algorithm which guarantees that your writes are persisted across at least a majority of nodes in your cluster before returning a success. In that situation, you’d need a catastrophic failure on a majority of nodes to lose data, however, there is generally a large performance trade off when running distributed consensus.