Database Replication Explained | System Design Interview Basics

preview_player
Показать описание
Relational databases have been around for more than 30 years. Effective Database replication patterns are one of the reasons why they did withstand the test of time so well.
Today, we look into the iconic main-replica pattern and ask how does it work and even more importantly how does it scale? This video is part of my system design interview preparation series.

00:00 - Intro
00:36 - Why Replication Matters
02:04 - What is replication?
03:28 - A brief history of replication
03:46 - Main-replica pattern
06:08 - Replace a replica node
07:29 - Replace the main node
10:06 - Why scalability matters
11:10 - Scaling reads
11:52 - Scaling write requests
14:21 - Summary

🐦 Follow me on Twitter:

🙌 Our Big Tech Community on discord!

✏️ Download FREE system component library for Excalidraw:

⭐️ Enrol to my 5.0-rated Course on System Design Interview Preparation:

🚀 Ace your system design interview!
#systemDesignInterview #replication #SQLdatabase
Рекомендации по теме
Комментарии
Автор

wow this is an amazing explanation, you can wrap several concepts in just a single video. Thanks for creating this video, this video helps me to prepare my incoming interview

hafizmfadli
Автор

Thank you so much for this video. It answered so many questions I had. Should be a must watch for anyone studying system designs / intro to system designs

Spade
Автор

You are doing great job... keep creating the content related to database. Well explained replication to shards.

nehasinghal
Автор

Replication is also used for distributed, ocasionally connected apps. This tutorial doesn't mention anything about it. Just because websites using databases with replication is popular now, doesn't mean replication doesn't have other uses.
It would be interesting to see a tutorial on replication for distributed databases, all handling reads and writes with thousands of tables, frequently changed schema and how updates are handled in such a system.

nilsfrahm
Автор

This video is really good! Concise explanation with great visuals. You deserve a lot more viewers! I have a few questions:
1. Why do we worry so much about replication and sharding when most of this is taken care by the database system itself. It is not usually implemented at an application level I believe (correct me if I am wrong).
2. How does data replication in SQL databases compare to that in NoSQL databases.
3. What happens in case a user tries to write to the main/master node from 2 multiple instances simultaneously?

inderjitsingh
Автор

Excellent content. You need more viewers

jibin
Автор

Once Report Manager Started, then replication is initialised.

mohamedmoideen
Автор

Nice! So database system will take care of copying data to slaves, it is matter of configuration on database system level....what about routing read n writing request to the respective db node, would that b implemented on the application level via some gateway to filter n send to respective db i.e., read or write???that is matter of configuration on load balancer or that would b explicitly written by app developer on gateway level?

jibranjaved