3 ms·
Can’t wait for Kyle to set Jepsen loose on this.
by danw1979 1y ago
Can’t wait for Kyle to set Jepsen loose on this.
- tptacek 1y agoLitestream is pretty boring for the testing Kyle does. It's not a distributed consensus system, but something more like a storage engine.
- Aurornis 1y agoJepsen is primarily for testing distributed systems and consensus systems. SQLite has neither of those.
- dastbe 1y agolitestream makes very few consistency guarantees compared to other datastores, and so I would expect most any issues found would be "working as intended". at the end of the day with litestream, when you respond back to a client with a successful write you are only guaranteeing a replication factor of 1.
- simonw 1y agoBy "replication factor of 1" you mean your data is stored on local disk only, right? That matches my understanding: Litestream replication is asynchronous, so there's usually a gap of a seconds or two between your write being accepted and the resulting updated page being pushed off to S3 or similar.
- dastbe 1y agoYes. the acknowledgement you're getting in your application code is that the data was persisted in sqlite on that host. There's no mechanism to delay acknowledgement until the write has been asynchronously persisted elsewhere.
- simonw 1y agoAn interesting comparison here is Cloudflare's Durable Objects, which provide a blocking SQLite write that doesn't return until the data has been written to multiple network replicas: https://blog.cloudflare.com/sqlite-in-durable-objects/#trick-two-relay-through-other-servers-in-our-global-network https://blog.cloudflare.com/sqlite-in-durable-objects/#trick...
- simonw 1y agoI wonder if it would be possible to achieve this using a SQLite VFS extension - maybe that could block acknowledgment of a right until the underlying page has been written to S3?