Rachit Jain
Rachit Jain
  • 170
  • 10 036 339
MultiLeader and LeaderLess Replication in Distributed Databases
In this video, we understand problems that arise due to distributed databases and replication lag. Why does CZcams 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: bit.ly/system-design-course
DDIA Book: amzn.to/3B6TJcm
Sponsored By Educative.io
✅ 𝗘𝗱𝘂𝗰𝗮𝘁𝗶𝘃𝗲.𝗶𝗼 [46% OFF] 👉🏻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] 👉🏻educative.io/rachit
✅ 𝗦𝘆𝘀𝘁𝗲𝗺 𝗗𝗲𝘀𝗶𝗴𝗻 [Discount for Indian audience] 👉🏻bit.ly/design-rachit
✅ 𝗣𝗿𝗼𝗴𝗿𝗮𝗺𝗺𝗶𝗻𝗴 𝗕𝗼𝗼𝗸𝘀 [Amazon Affiliate] 👉🏻amazon.in/shop/rachitjain
SUBSCRIBE AND HIT BELL ICON TO CHECK MORE OF MY CONTENT
czcams.com/users/RachitJain
𝗦𝗢𝗖𝗜𝗔𝗟 𝗣𝗥𝗢𝗙𝗜𝗟𝗘𝗦
✅ Portfolio Website - rachitiitr.com
✅ Instagram - rachitiitr
✅ LinkedIn - linkedin.com/in/rachitiitr
✅ Twitter - rachitiitr
✅ Github - github.com/rachitiitr/DataStructures-Algorithms
✅ Facebook - AlgorithmsWithRachitJain
𝗜𝗠𝗣𝗢𝗥𝗧𝗔𝗡𝗧 𝗣𝗟𝗔𝗬𝗟𝗜𝗦𝗧𝗦
✅ 𝗖𝗼𝗱𝗶𝗻𝗴 𝗜𝗻𝘁𝗲𝗿𝘃𝗶𝗲𝘄 𝗟𝗲𝗰𝘁𝘂𝗿𝗲𝘀 👉🏻czcams.com/video/J1JZjhdr3Oo/video.html
✅ 𝗚𝗿𝗮𝗽𝗵 𝗧𝗵𝗲𝗼𝗿𝘆 𝗣𝗹𝗮𝘆𝗹𝗶𝘀𝘁 👉🏻czcams.com/video/xyJxCjweLKE/video.html
✅ 𝗖++ 𝗦𝗧𝗟 𝗣𝗹𝗮𝘆𝗹𝗶𝘀𝘁 👉🏻czcams.com/video/g-1Cn3ccwXY/video.html
✅ 𝗠𝘆 𝗣𝗲𝗿𝘀𝗼𝗻𝗮𝗹 𝗜𝗻𝘁𝗲𝗿𝘃𝗶𝗲𝘄 𝗘𝘅𝗽𝗲𝗿𝗶𝗲𝗻𝗰𝗲𝘀 👉🏻czcams.com/video/0Vmtmqa9Og0/video.html
✅𝗣𝗿𝗼𝗱𝘂𝗰𝘁𝗶𝘃𝗶𝘁𝘆 𝗧𝗶𝗽𝘀 𝗣𝗹𝗮𝘆𝗹𝗶𝘀𝘁 👉🏻czcams.com/video/0Vmtmqa9Og0/video.html
✅𝗟𝗶𝗳𝗲 𝗟𝗲𝘀𝘀𝗼𝗻𝘀 & 𝗠𝗲𝗻𝘁𝗼𝗿𝘀𝗵𝗶𝗽 👉🏻czcams.com/video/9SGM0EqyUc0/video.html
𝗣𝗥𝗢𝗚𝗥𝗔𝗠𝗠𝗜𝗡𝗚 𝗣𝗥𝗢𝗙𝗜𝗟𝗘𝗦
✅ Github ► github.com/rachitiitr/DataStructures-Algorithms
✅ Programming Blog ► rachitiitr.blogspot.com
✅ CodeForces ► www.codeforces.com/profile/rachitjain
✅ CodeChef ► www.codechef.com/users/rachitiitr
zhlédnutí: 13 124

Video

🔴 Why YouTube Hides Subscriber Count? Problems with Distributed Databases
zhlédnutí 9KPřed 2 lety
In this video, we understand problems that arise due to distributed databases and replication lag. Why does CZcams 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. ...
🔴 How DataBase Replication works? WATCH THIS before your System Design Interview
zhlédnutí 15KPřed 2 lety
In this video, we understand what is Distributed Data, its benefits and how does Replication work behind the scenes. How is Replication Sync happening, what are the possible architectures, what are their benefits and drawbacks? The DDIA Book is a great recommendation for System Design and I would like to summarise the chapters and my learnings here. References DDIA Book: amzn.to/3B6TJcm System ...
Why JSON lost to Google Protocol Buffers? How MicroServices Communicate Efficiently Together?
zhlédnutí 48KPřed 2 lety
In this video, we understand how is response data encoded during inter-network communications and also how is it stored on disk? Sets, Maps, Arrays - they are in-memory data structures. But how can we store them on disks? Python uses in-built pickle module to encode (serialize) data to store them onto disks. But can it be read by a Java client? Things would have been easy if we used JSON to enc...
If You are Scared of Webpack, WATCH THIS! #JavaScript #SeniorSoftwareEngineer
zhlédnutí 10KPřed 2 lety
In this video, we talk about Webpack - why its needed, what it does, the technical knowledge needed to understand Webpack, how to configure it to import different files like CSS, TypeScript, JSX, etc. Sponsored By Educative.io ✅ 𝗘𝗱𝘂𝗰𝗮𝘁𝗶𝘃𝗲.𝗶𝗼 [46% OFF] 👉🏻bit.ly/educative-unlimited-extra-discount Educative.io coupon "rachit" to get extra discount or use the link above to get "Unlimited" access to...
B-Trees, Indexing and TeraBytes of Data || System Design by @RachitJain
zhlédnutí 17KPřed 2 lety
In this video, we understand what are B-Trees, how they work, how we leverage them to create indexes in Databases, how they are different from LSM Trees, the pros and cons of B-Trees, etc. The DDIA Book is a great recommendation for System Design and I would like to summarise the chapters and my learnings here. References DDIA Book: amzn.to/3B6TJcm System Design Playlist: bit.ly/system-design-c...
System Design: LSM Trees | Data Structure Behind Google and Facebook Storage Engine
zhlédnutí 22KPřed 2 lety
In this video, we talk about how LSM Trees are used to design advanced databases built for high speed reads and writes. In this video, we navigate what it takes to design a database engine ourselves - handling persistence to disk, crash recovery, optimizations in crash recoveries and much more. The DDIA Book is a great recommendation for System Design and I would like to summarise the chapters ...
Design a Low Latency DataBase Optimised For Writes || System Design Crash Course by @RachitJain
zhlédnutí 18KPřed 2 lety
✅ 𝗘𝗱𝘂𝗰𝗮𝘁𝗶𝘃𝗲.𝗶𝗼 [46% OFF] 👉🏻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! Rachit, an ex-Software Engineer@Microsoft talks about how to design a simple database built for high spe...
Are NoSQL Databases Better Than SQL Databases?
zhlédnutí 10KPřed 2 lety
✅ 𝗘𝗱𝘂𝗰𝗮𝘁𝗶𝘃𝗲.𝗶𝗼 [46% OFF] 👉🏻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! Rachit, an ex-Software Engineer@Microsoft talks about how to discuss trade-offs b/w NoSQL v/s SQL Databa...
How Amazon Measures Performance of its System Design
zhlédnutí 9KPřed 2 lety
✅ 𝗘𝗱𝘂𝗰𝗮𝘁𝗶𝘃𝗲.𝗶𝗼 [46% OFF] 👉🏻educative.io/rachit 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! Rachit, an ex-Software Engineer@Microsoft talks about System Design basics. System Design is a very hot topic in intermediate ...
How did Twitter Achieve Scalability || System Design Crash Course by @RachitJain
zhlédnutí 13KPřed 2 lety
How did Twitter Achieve Scalability || System Design Crash Course by @RachitJain
Reliability, Faults and Failures in Software Engineering || System Design Crash Course
zhlédnutí 16KPřed 2 lety
Reliability, Faults and Failures in Software Engineering || System Design Crash Course
Giving Coding Interview Challenges to CSS Expert Kevin Powell
zhlédnutí 27KPřed 3 lety
Giving Coding Interview Challenges to CSS Expert Kevin Powell
🔴Internet is down - Quick Downtime Analysis of StackOverflow, Github, Quora || Fastly Outage 2021
zhlédnutí 13KPřed 3 lety
🔴Internet is down - Quick Downtime Analysis of StackOverflow, Github, Quora || Fastly Outage 2021
S02E02 #AlgoWorkout with @gkcs | Algorithmic Problem Challenge
zhlédnutí 20KPřed 3 lety
S02E02 #AlgoWorkout with @gkcs | Algorithmic Problem Challenge
How I Use Terminal as a 10x Software Developer? Productivity Boost Hacks ✅
zhlédnutí 25KPřed 3 lety
How I Use Terminal as a 10x Software Developer? Productivity Boost Hacks ✅
Android Coding Interview with @Singh in USA - Hands On Software Engineering Interview
zhlédnutí 85KPřed 3 lety
Android Coding Interview with @Singh in USA - Hands On Software Engineering Interview
🔴 7 Hacks to Solve Any Coding Interview Problem || General Approach for Problem Solving
zhlédnutí 38KPřed 3 lety
🔴 7 Hacks to Solve Any Coding Interview Problem || General Approach for Problem Solving
✅ 6 Tips To Get Jobs Faster with More Income in 2021 || Rachit Jain || Software Engineering
zhlédnutí 29KPřed 3 lety
✅ 6 Tips To Get Jobs Faster with More Income in 2021 || Rachit Jain || Software Engineering
🔴 Google Coding Interview with ex-Facebook ex-Stanford Co-Founder || Software Engineering Interview
zhlédnutí 59KPřed 3 lety
🔴 Google Coding Interview with ex-Facebook ex-Stanford Co-Founder || Software Engineering Interview
Honest Guide to Cracking Amazon SDE II - System Design and Leadership Principles
zhlédnutí 94KPřed 3 lety
Honest Guide to Cracking Amazon SDE II - System Design and Leadership Principles
From Flunking Amazon to L62 Microsoft Developer || Honest Developer Talk
zhlédnutí 51KPřed 3 lety
From Flunking Amazon to L62 Microsoft Developer || Honest Developer Talk
20 Mins To Demystifying Pointers in C++ from Scratch
zhlédnutí 18KPřed 3 lety
20 Mins To Demystifying Pointers in C from Scratch
🎄 Christmas Tree using 1 line of Python | Merry Christmas 😁
zhlédnutí 11KPřed 3 lety
🎄 Christmas Tree using 1 line of Python | Merry Christmas 😁
Demystifying Hard Interview Question as an ex-Microsoft Developer | Data Structures and Algorithms
zhlédnutí 15KPřed 3 lety
Demystifying Hard Interview Question as an ex-Microsoft Developer | Data Structures and Algorithms
How do I manage my SWE Job, YouTube, LinkedIn and Health consistently?
zhlédnutí 13KPřed 3 lety
How do I manage my SWE Job, CZcams, LinkedIn and Health consistently?
How to overcome procrastination in Software Engineering? | Motivational LinkedIn QnA Session
zhlédnutí 20KPřed 3 lety
How to overcome procrastination in Software Engineering? | Motivational LinkedIn QnA Session
Google Interview Question || Free Giveaway worth 7500 INR
zhlédnutí 14KPřed 3 lety
Google Interview Question || Free Giveaway worth 7500 INR
Day 5 (Bit Manipulations) - Mock Coding Interview || Interview Prep for Beginners
zhlédnutí 11KPřed 3 lety
Day 5 (Bit Manipulations) - Mock Coding Interview || Interview Prep for Beginners
Day 4 - Mock Coding Interview || Interview Prep for Beginners || Stay Home, Code With Me || Easy
zhlédnutí 10KPřed 3 lety
Day 4 - Mock Coding Interview || Interview Prep for Beginners || Stay Home, Code With Me || Easy

Komentáře

  • @erock7073
    @erock7073 Před 11 minutami

    Great video, thanks for the clear explanation! God bless

  • @justloveandpeace4010

    bhai jetpack compose ka interview banao pls

  • @FunPart-xr4jg
    @FunPart-xr4jg Před měsícem

    Amazing

  • @yug._.27
    @yug._.27 Před měsícem

    Mines is not working, it's some kind of version error. (Edit): It is working for the tittle but the you tube thumbnails are not being blur.

  • @siddharthmagadum16
    @siddharthmagadum16 Před měsícem

    Revisiting this video, makes me feel good 😄

  • @ashutosh_verma_fullstack
    @ashutosh_verma_fullstack Před měsícem

    150 rupiya kaat overacting ka ...

  • @ashutosh_verma_fullstack
    @ashutosh_verma_fullstack Před měsícem

    _=[print((20-i)*' ' + '*'*(2*i+1) if i < 10 else ' '*20+'*') for i in range(15)] or print(*[(20-i)*' ' + '*'*(2*i+1) if i < 10 else ' '*20+'*' for i in range(15)], sep=" ")

  • @ashutosh_verma_fullstack
    @ashutosh_verma_fullstack Před měsícem

    bhai order thoda upar neeche hai

  • @AdnanAbdulBasir
    @AdnanAbdulBasir Před měsícem

    Thanks

  • @a1988ditya
    @a1988ditya Před měsícem

    This guy disappeared into thin air? I rember yes bck this guy n tht gaurav sen

  • @codingwithnamit8551
    @codingwithnamit8551 Před 2 měsíci

    explained it so well!! thank you so much!

  • @killerthoughts6150
    @killerthoughts6150 Před 2 měsíci

    what the hell, after 11 mins of patiently waiting for the way to do the sum, I learn that its in part 2 whose link is not here. GOD, thanks though learnt the space complexity is O(n) but it took 11 mins for that I learnt there hasn't been part 2 at all ......

    • @dfhg315
      @dfhg315 Před měsícem

      but what is use then to generate segment tree it take o(n) time. Instead we can use the brute force method. I ask the same question to the charge GPT it tells that for generating it takes n / log n time complexity not o(n) this is response of chatgpt ===> No, generating or building a segment tree from an array takes \(O(n \log n)\) time complexity, not \(O(n)\). Here's why: - **Building the tree:** Each level of the segment tree represents a merging of nodes from the previous level. If there are \(n\) elements, there are \(O(\log n)\) levels in the tree because the height of a segment tree is \(O(\log n)\). - **Merging nodes:** Each level has at most \(n\) nodes, and merging each node involves a constant amount of work. Therefore, the total time to build the segment tree is \(O(n \log n)\).

  • @nitesh__sharma
    @nitesh__sharma Před 2 měsíci

    Bhai Rachit kaha chle gye .. Harkirat Singh ne aapke Space ko le liya hai actually . Hope u r good

  • @saurabhmittal6947
    @saurabhmittal6947 Před 2 měsíci

    I believe, longest valid parentheses can be solved by maintaining a simple stack and keep removing the valid parentheses and maximising the length which will be calculated using the difference between current index and stack's top element index

  • @OnTheGoRahul
    @OnTheGoRahul Před 2 měsíci

    Thank you so much for this video. Cleared all my doubts.

  • @saurabhmittal6947
    @saurabhmittal6947 Před 2 měsíci

    IF bloom filter is present per SSt then we would still need to search for all SSTs ?

  • @saurabhmittal6947
    @saurabhmittal6947 Před 2 měsíci

    this video needs to be swapped with 5th video.. videos are out of order in this playlist.

  • @saurabhmittal6947
    @saurabhmittal6947 Před 2 měsíci

    Put this video as 1st video in this playlist. You have misplaced it.

  • @ss590
    @ss590 Před 2 měsíci

    Yrrrr but ye painful 💔 tha ye bhtttt ❤ 😂 Purane yaaade ❤

  • @stanlyjsamuel
    @stanlyjsamuel Před 3 měsíci

    Thank you! Very well explained in a crystal clear manner with concrete examples, not hand wavy!

  • @mothafucka
    @mothafucka Před 3 měsíci

    pretty messed up

  • @balkiprasanna1984
    @balkiprasanna1984 Před 3 měsíci

    Great video.

  • @AbrarAhmed-sz9qz
    @AbrarAhmed-sz9qz Před 3 měsíci

    What a beautiful video, got all of my questions answered. Subscribed!

  • @_its._gaurav._
    @_its._gaurav._ Před 3 měsíci

    IITian interviewing another IITian on how to get into Stanford is unrealistic for most ppl

  • @norcal8718
    @norcal8718 Před 3 měsíci

    WHAT???

  • @juhairahamed5342
    @juhairahamed5342 Před 4 měsíci

    Good Explanation bro

  • @zorogamer9629
    @zorogamer9629 Před 4 měsíci

    Participants' engagement in research symposiums showcases their contributions to their fields in the DMP program. Can you make a video discussing symposium presentations?

  • @NikitaNair
    @NikitaNair Před 4 měsíci

    Thank you so much!!! Tomorrow is my data structures end semester exam :)

  • @sanasainath7758
    @sanasainath7758 Před 5 měsíci

    nice explanation

  • @akicr7
    @akicr7 Před 5 měsíci

    Which app are you using for note taking?

  • @dasstraat
    @dasstraat Před 5 měsíci

    Network load is not a crucial factor anymore. There is however no decent standardized way to convert C++ to JSON. For grpc there is a convertor for this, although the files are ridigoulous comp[licated to read.

  • @zkkzkk32312
    @zkkzkk32312 Před 6 měsíci

    This wouldn't work if the input has duplicate?

  • @tarunmali6228
    @tarunmali6228 Před 6 měsíci

    20:40 ts

  • @ankitpahwa8571
    @ankitpahwa8571 Před 6 měsíci

    really really * 1000

  • @abhinavsrivastava2128
    @abhinavsrivastava2128 Před 6 měsíci

    Heart is aching now to explore other loaders - starting first with tsx loader.. thanks for this heart ache 🤩

  • @Relaxation_music_calm
    @Relaxation_music_calm Před 6 měsíci

    Could you show how to write code in c++

  • @kambalavijay6800
    @kambalavijay6800 Před 6 měsíci

    How is byte sequence retrived?

  • @priyanshikmv
    @priyanshikmv Před 7 měsíci

    mujhe software eng banna hai, walmart main naukri karni hai, 27 lakh ka package h, video bna do codehers pe

  • @karthikk2316
    @karthikk2316 Před 7 měsíci

    Easy for cyclic sort if anyone watched @kunalKushwaha will know this one is an easy problem😊

  • @bhaumikpandya2058
    @bhaumikpandya2058 Před 7 měsíci

    Why not kotlin

  • @priyanshikmv
    @priyanshikmv Před 7 měsíci

    Pls loreal brandstorm ke liye tips de dijiye

  • @chuckynorris616
    @chuckynorris616 Před 8 měsíci

    praise the lord.. ganesh

  • @iftakharuddin4082
    @iftakharuddin4082 Před 8 měsíci

    Great work! Go ahead.

  • @albert.praveen
    @albert.praveen Před 8 měsíci

    what can we do if the array size is in odd so we would not be able to construct the tree know ?

    • @RachitJain
      @RachitJain Před 8 měsíci

      if you are doing sum range queries, you can append 0s to array to give it the size you need

  • @vaibhavdesai16
    @vaibhavdesai16 Před 8 měsíci

    Non IITian but I feel IIT tag indirectly says you have worked really hard at some point of time in your life.

  • @divya__shakya
    @divya__shakya Před 8 měsíci

    💛💛💛💛💛🩷💛💛💛

  • @divya__shakya
    @divya__shakya Před 8 měsíci

    Finallyyyyyy.....❤❤❤The Channel i was looking for

  • @tiger.649
    @tiger.649 Před 8 měsíci

    Hello bhaiya, Jio Creative Labs PPI derha hai koi hackathon se. Koi knowledge ho apko?

  • @NuncNuncNuncNunc
    @NuncNuncNuncNunc Před 8 měsíci

    3:28 Definitions are not quite right. Trees are acyclic and forests are disjoint union of trees so 4-5 is a tree and also forest (on one tree) the other subgraph is neither tree nor forest and the total graph is not a forest. Suppose edge 1-3 is removed to make the first subgraph a tree, I think it would be more typical to say Tree 1 and Tree 2 and call the graph a forest of these two trees.