MultiLeader and LeaderLess Replication in Distributed Databases

Rachit Jain Podcast 4 years ago

Description

In this video, we understand problems that arise due to distributed databases and replication lag. Why does YouTube hide subscriber count partially?
Instead of 190343, it says 190K subscribers. Reason is subscriber count value is different in different replica clusters, and it gives users a bad experience when they see going back in time and seeing a stale count value showing a false decrement.
We understand the various other problems that come into picture with replication lag, and how to mitigate the same as application developers.

The DDIA Book is a great recommendation for System Design and I would like to summarise the chapters and my learnings here.

References
System Design Playlist: https://bit.ly/system-design-course
DDIA Book: https://amzn.to/3B6TJcm

Sponsored By Educative.io
โœ… ๐—˜๐—ฑ๐˜‚๐—ฐ๐—ฎ๐˜๐—ถ๐˜ƒ๐—ฒ.๐—ถ๐—ผ [46% OFF] ๐Ÿ‘‰๐Ÿปhttps://bit.ly/educative-unlimited-extra-discount
Educative.io coupon "rachit" to get extra discount or use the link above to get "Unlimited" access to "ALL" courses on their websites - React, System Design, Coding Interview in C++, Python, Java, Redux, Docker and what not!

Chapters
00:00 Recap of Single Leader Architecture
02:04 How Single Leader differs from Multi-Leader Replication
3:15 Benefits of Multi-Leader Replication
4:02 Example of Write Conflicts in Multi-Leader Replication
5:08 Conflict Problem Analysis in single-leader replication
5:36 Conflict Problem Analysis in multi-leader replication
07:01 Few strategies for to resolve conflicts
08:31 Topologies in Multi Leader Replication
09:35 Problem with All to All Replication
10:38 Co-relation with the Consistent Prefix Reads
11:03 Version Vectors
11:35 Reality of Multi Leader Replication - poorly handled
11:57 Why documentation and testing is important?
12:08 Leader-less Replication
12:58 How reads and writes work in leader-less replication?
14:02 R+W Greater Than N: Quorum Reads and Writes
15:42 Demo of how better availability and tolerance in leaderless replication systems

๐—œ๐—ก๐—ง๐—˜๐—ฅ๐—ฉ๐—œ๐—˜๐—ช ๐—ฃ๐—ฅ๐—˜๐—ฃ ๐—ฃ๐—ฅ๐—ข๐——๐—จ๐—–๐—ง๐—ฆ
โœ… ๐—˜๐—ฑ๐˜‚๐—ฐ๐—ฎ๐˜๐—ถ๐˜ƒ๐—ฒ.๐—ถ๐—ผ [10% OFF for First 90 Users] ๐Ÿ‘‰๐Ÿปhttps://educative.io/rachit
โœ… ๐—ฆ๐˜†๐˜€๐˜๐—ฒ๐—บ ๐——๐—ฒ๐˜€๐—ถ๐—ด๐—ป [Discount for Indian audience] ๐Ÿ‘‰๐Ÿปhttps://bit.ly/design-rachit
โœ… ๐—ฃ๐—ฟ๐—ผ๐—ด๐—ฟ๐—ฎ๐—บ๐—บ๐—ถ๐—ป๐—ด ๐—•๐—ผ๐—ผ๐—ธ๐˜€ [Amazon Affiliate] ๐Ÿ‘‰๐Ÿปhttps://amazon.in/shop/rachitjain

SUBSCRIBE AND HIT BELL ICON TO CHECK MORE OF MY CONTENT
http://youtube.com/RachitJain?sub_confirmation=1


๐—ฆ๐—ข๐—–๐—œ๐—”๐—Ÿ ๐—ฃ๐—ฅ๐—ข๐—™๐—œ๐—Ÿ๐—˜๐—ฆ
โœ… Portfolio Website - https://rachitiitr.com
โœ… Instagram - https://www.instagram.com/rachitiitr
โœ… LinkedIn - https://linkedin.com/in/rachitiitr
โœ… Twitter - https://twitter.com/rachitiitr
โœ… Github - https://github.com/rachitiitr/DataStructures-Algorithms
โœ… Facebook - https://fb.me/AlgorithmsWithRachitJain


๐—œ๐— ๐—ฃ๐—ข๐—ฅ๐—ง๐—”๐—ก๐—ง ๐—ฃ๐—Ÿ๐—”๐—ฌ๐—Ÿ๐—œ๐—ฆ๐—ง๐—ฆ
โœ… ๐—–๐—ผ๐—ฑ๐—ถ๐—ป๐—ด ๐—œ๐—ป๐˜๐—ฒ๐—ฟ๐˜ƒ๐—ถ๐—ฒ๐˜„ ๐—Ÿ๐—ฒ๐—ฐ๐˜๐˜‚๐—ฟ๐—ฒ๐˜€ ๐Ÿ‘‰๐Ÿปhttps://www.youtube.com/watch?v=J1JZjhdr3Oo&list=PLfBJlB6T2eOshO8-LYaMt-Pes1IFojJ_l
โœ… ๐—š๐—ฟ๐—ฎ๐—ฝ๐—ต ๐—ง๐—ต๐—ฒ๐—ผ๐—ฟ๐˜† ๐—ฃ๐—น๐—ฎ๐˜†๐—น๐—ถ๐˜€๐˜ ๐Ÿ‘‰๐Ÿปhttps://www.youtube.com/watch?v=xyJxCjweLKE&list=PLfBJlB6T2eOu3dTPKzvAf2axlmQUXGY91
โœ… ๐—–++ ๐—ฆ๐—ง๐—Ÿ ๐—ฃ๐—น๐—ฎ๐˜†๐—น๐—ถ๐˜€๐˜ ๐Ÿ‘‰๐Ÿปhttps://www.youtube.com/watch?v=g-1Cn3ccwXY&list=PLfBJlB6T2eOvyt21CIX_PMmhOgWHiFVab
โœ… ๐— ๐˜† ๐—ฃ๐—ฒ๐—ฟ๐˜€๐—ผ๐—ป๐—ฎ๐—น ๐—œ๐—ป๐˜๐—ฒ๐—ฟ๐˜ƒ๐—ถ๐—ฒ๐˜„ ๐—˜๐˜…๐—ฝ๐—ฒ๐—ฟ๐—ถ๐—ฒ๐—ป๐—ฐ๐—ฒ๐˜€ ๐Ÿ‘‰๐Ÿปhttps://www.youtube.com/watch?v=0Vmtmqa9Og0&list=PLfBJlB6T2eOuUAof03sQFlUcrk_Bc7jOA
โœ…๐—ฃ๐—ฟ๐—ผ๐—ฑ๐˜‚๐—ฐ๐˜๐—ถ๐˜ƒ๐—ถ๐˜๐˜† ๐—ง๐—ถ๐—ฝ๐˜€ ๐—ฃ๐—น๐—ฎ๐˜†๐—น๐—ถ๐˜€๐˜ ๐Ÿ‘‰๐Ÿปhttps://www.youtube.com/watch?v=0Vmtmqa9Og0&list=PLfBJlB6T2eOuUAof03sQFlUcrk_Bc7jOA
โœ…๐—Ÿ๐—ถ๐—ณ๐—ฒ ๐—Ÿ๐—ฒ๐˜€๐˜€๐—ผ๐—ป๐˜€ & ๐— ๐—ฒ๐—ป๐˜๐—ผ๐—ฟ๐˜€๐—ต๐—ถ๐—ฝ ๐Ÿ‘‰๐Ÿปhttps://www.youtube.com/watch?v=9SGM0EqyUc0&list=PLfBJlB6T2eOv8klCHHNVLOmTOIxKu-xzn



๐—ฃ๐—ฅ๐—ข๐—š๐—ฅ๐—”๐— ๐— ๐—œ๐—ก๐—š ๐—ฃ๐—ฅ๐—ข๐—™๐—œ๐—Ÿ๐—˜๐—ฆ
โœ… Github โ–บ https://github.com/rachitiitr/DataStructures-Algorithms
โœ… Programming Blog โ–บ http://rachitiitr.blogspot.com
โœ… CodeForces โ–บ http://www.codeforces.com/profile/rachitjain
โœ… CodeChef โ–บ http://www.codechef.com/users/rachitiitr