-
Notifications
You must be signed in to change notification settings - Fork 553
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support for Diskless Replication #997
base: main
Are you sure you want to change the base?
Conversation
b802961
to
9a4ad8f
Compare
…nager, add more logging
5769f37
to
10df706
Compare
if Our system reuses the same AOF for local roll-forward as what is used for replication, so this would be necessary for completeness. |
Yes, that makes sense. I will add a guard for this based on the MMR flag and update the description. |
The concern is that we introduce 'diskless replication' in this PR, which semantically conflicts with 'main memory replication' which makes it confusing. Could we perhaps add |
This PR adds support for diskless replication (it is more of diskless full synchronization, but I am using Redis terminology to be consistent).
When replicas attach to a primary and require full synchronization, due to AOF truncation, they might incur an on-demand-checkpoint and will require for the latest checkpoint data to be streamed to them for recovery.
This method of full synchronization is extremely inefficient for the following reasons:
With diskless replication we aim to eliminate these inefficiencies. Diskless replication relies on the streaming snapshot feature of tsavorite (#824) to stream a consistent snapshot of key-value pairs to the replica when full synchronization is necessary.
When a replica attempts to synchronize with an active primary, it performs the following steps:
By using the streaming checkpoint approach, we eliminate write and read amplification at the primary.
In addition, by allowing multiple replicas to synchronize in parallel, we reduce the overhead of scanning the TsavoriteStore multiple times.
Finally, we eliminate both read and write amplification at the replica because we don't require writing and reading the checkpoint to recover before starting to stream the AOF records.
NOTES: