- Background
- What is replication and why we need it
- Replication definition
- How it helps
- Master slave architecture
- Overview
- Why we use it? -> HA, scale read performance, simpler than multi read multi write
- What is replication and why we need it
- Master slave replication
- A simplistic approach
- List steps:
- Stop accepting new request
- Make snapshot, send to slave
- Wait for slave to be synched, start accepting request
- While also forwarding them to slave
- Discuss pros/cons
- Discuss improvement that can be done at each ‘step’, i.e if lost connection
- List steps:
- Redis way
- List steps of PSYNC:
- Send config info to master
- Send PSYNC to master
- Retrieve snapshot and load up
- Sync the remaining buffered command
- Accepts new forwarded command and normal read commands
- Show example code/peusdo code from Keva
- Details on the buffer log and the slave log
- List steps of PSYNC:
- A simplistic approach
- Do brief comparison with master-slave replication from other DB as well i.e MySQL
- Short summary
- References:
- https://redis.io/docs/manual/replication/
- https://github.com/redis/redis/blob/unstable/src/replication.c
- https://www.youtube.com/watch?v=esbRryo0Ty8
- https://developpaper.com/an-in-depth-explanation-of-redis-master-slave-replication-principle/
- http://antirez.com/news/45
- http://antirez.com/news/47
- http://antirez.com/news/58
Last active
May 30, 2022 09:52
-
-
Save tuhuynh27/aed749648961ed7eeb9b5dea39712f9d to your computer and use it in GitHub Desktop.
Keva Replication Article
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment