Database Replication | Synchronous vs Asynchronous | System Design Tutorials | Lecture 18 | 2020

preview_player
Показать описание
This is the eighteenth video in the series of System Design Primer Course. We talk about one more important component of System Design: Database Replication.
We want software engineers and aspiring software engineers to develop basics and get ready for the world of interviews as well as excelling as a Software Engineer.

------------------------------------------------------------------
Recommendations
------------------------------------------------------------------
Our full courses on youtube:

Some paid courses that we recommend:

------------------------------------------------------------------
About Us
------------------------------------------------------------------
Created and Instructed by:
Yogita Sharma

Post-production(editing, thumbnail etc) managed by:
CiKi

Colors and design by:
Naini Todi

Both Arpit and Yogita are software engineers and want to help other software engineers become better by providing high quality and well researched content by adding their creativity and teaching twist.

------------------------------------------------------------------
Join Us
------------------------------------------------------------------
Hangout with sudoCode:

For business:

------------------------------------------------------------------------------------------------------------------------------------
Timestamps:
0:00 - Intro
0:53 - What does replication mean ?
5:45 - Understanding replication lag
7:21 - Replicating Synchronously
9:44 - Advantages of synchronous replication
11:24 - Asynchronous Replication
16:10 - DB replica versus Snapshot
17:27 - Summary
Рекомендации по теме
Комментарии
Автор

Hello peeps! Hope you like the video. Apologies about the traffic noise in the start. Was recording this late at night in my home town in India. :)

sudocode
Автор

I was searching all over the internet for System design videos that are basic and which I can easily understand. This series helped me a lot in understanding the basic concepts. Nicely explained. Now I'm thinking about why I didn't start searching a little early 🙂. Please add the reference links in your description. I can't find them. Thanks again Yogita.

romasahoo
Автор

Conceptually you are the best teacher mam...

Mridul
Автор

loving this video series - finding it very helpful!

skylarw
Автор

I don't know but whenever I see your explanation it feels like my big sister is teaching me.. Although I don't have one 😐... Amazing content can't imagine it's for free..

neerajmahapatra
Автор

Thank you so much, I've watch couple of videos but you are the one that makes me get it!

binyammamo
Автор

Hello Yogita,
Great informative video as always but was really looking forwards to learn more about the different replication models which you were touching upon briefly throughout the video. You seem to stress a lot on exploring the additional resource links in the description of the video. But unfortunately, they seem to have been missed somehow. This has been the case in past few of the videos too.
Could you please update the descriptions of video to have those links added?
Thanks in advance.

sahild
Автор

I was confused with aerospike db for implementing a ratelimiter algorithm to store and access atomic counters in faster way, as it has many read write polices between master and slaves. Finally this video clears my doubts to understand such systems.

tirupatirao
Автор

Hi Yogita, I really liked the series, especially the real-world analogies given at the start. However, I would request you to please add the resources in the description, as they are missing in many videos.

nikhilgoyal
Автор

@sudoCODE, Yogita, thanks for the detailed explanation. Could you please update the links as you mentioned, couldn't find them in the description box. Thank u.

manjulathavajhala
Автор

my notes below:

Replication:
Pros - Fault tolerance, secondary mains, latency reduction, cqrs, Performance improvement, availability.
Cons - lag) -> Data inconsistency.

Solution for data consistency
Read after write consistency

To be continued....
#SR7

shridhar_rao
Автор

I understand very easily by the way you teach. So please make a in depth video of database replication as it becomes very important when data transaction is very large.

itisnewiin
Автор

Thank you so much it is really helpful.

official-DRFRE
Автор

Short and sweet introduction to replication. Though you mention it is short information of big topic, in replication if primary goes down then one of secondary become primary and in case of asynchronous how to make sure that secondary selected out of consistent only.

jinalkumarpatel
Автор

You are going great job.
Please make more detailed video database replication .

nirajsharma
Автор

i want to know more on data replication engine, i want you to make a complete vedio for data replication project, how it works....the way you teach is greate.
thanks

zainabmahmood
Автор

Thanks a lot for the nice explanation. Shared the channel link to the coding community sites to acquire the greater number of audience for such an informative topics of system design. Pls do post video on system design example
- facebook feed, google serarch, instagram working, uber architecture.
Thanks

ChandraShekhar-bycd
Автор

the way you explained synchronous replication feels incomplete. To me, if the replicas are serving the reads (as described a minute before.) then there is a time when some of the replicas have done the write and sent their ack, and others have replicas have not yet done so. At that point the replicas which have not yet acknowledged will be reporting the old value, and those that have acknowledged should return the new one.

I suspect there is another round of of packets to circulate to confirm (commit) that the write has succeeded, and only after the second round trip should the master answer that the write has succeeded.

petersilva
Автор

Very good videos. Thanks for the content.

veena
Автор

Hey, I am a bit confused about synchronous replication and how it solves consistency issues in case of high latency between the replicas. You explained that the write is initiated on the master and is broadcasted to all the replicas. The replicas execute the write command and send back acknowledgments. What happens if there is a read during this process? It is quite possible that a read request on the master is going to be different from the read request to one of the replicas. Do we accept that inconsistency? In a write and read-heavy system, this will happen a non-trivial number of times.

swapnendusanyal