3 ms·
LiteFS author here. It depends on the application. You can check the replication position on the replicas and simply wait until the replica catches up. That req
by benbjohnson 4y ago
LiteFS author here. It depends on the application. You can check the replication position on the replicas and simply wait until the replica catches up. That requires maintaining that position on the client though.
An easier approach that works for a lot of apps is to simply have the client read from the primary for a period of time (e.g. 5 seconds) after they issue a write. That's easy to implement with a cookie and it's typically "good enough" consistency for many read-heavy applications.