Database Replication 101: A Beginner's Guide to Building High-Availability Systems
Ria Bhatia31:542023
A backup won't save your latest writes when the server catches fire
When a server catches fire, a backup restores slowly and is missing every change written since it was taken, while a replica can take over requests at once. For anyone designing systems that must stay up, the replication model decides write speed, consistency and the risk of data loss. Fintech software engineer Ria Bhatia, with Tanya Sneh, walks through leaders, followers and a live MySQL demo before the real question: which trade-offs fit your system?
Learn to pick a replication model and handle replication lag and write conflicts
Software engineers Ria Bhatia and Tanya Sneh introduce database replication for beginners, explaining why replicas cut latency, survive failures and scale reads. They compare single-leader, multi-leader and leaderless designs, show asynchronous replication live in MySQL, and teach practical fixes for replication lag and write conflicts.
“So, no, data replication is not just a backup.”
“Your replication process is only as good as your ability to recover from a failure.”
What you will learn
Explain the three core benefits of replication: lower latency, continued service when parts fail, and scaling for read-heavy workloads.
Compare synchronous and asynchronous replication and their effects on write speed, stale reads and data loss.
Choose between single-leader, multi-leader and leaderless architectures based on write load and geography.
Apply read-your-writes and monotonic read consistency to hide replication lag from users.
Plan conflict resolution, monitoring, alerting, backup and testing before rolling out replication.
Key takeaways from the speaker
Understanding the purpose of database replication and its benefits, including improved performance and reduced downtime
Will serve as a stepping stone in making better design decisions and effectively conveying them, even if you lack prior experience in the problem domain
Details
Level
Beginner
Format
Tech talk
Technical depth
Practitioner
For
Student, Early career, Mid-career
Length
31:54
Published
June 2023
Questions this talk answers
Why isn't a regular backup enough to keep a system available?
A backup takes time to restore and lacks the latest changes written to the failed server. A replica that receives the same changes as the leader can serve requests immediately.
What is the difference between synchronous and asynchronous single-leader replication?
Asynchronous replication acknowledges writes quickly but leaves followers eventually consistent, risking stale reads and data loss if the leader fails. Synchronous replication waits for all followers, making writes slow and possibly stalling the system, so many setups combine the two.
When does multi-leader replication make sense?
It suits write-heavy or geographically distributed systems, letting clients write to the nearest leader. The cost is that concurrent writes in different regions can create conflicts.
How can you protect users from replication lag?
Read-your-writes consistency routes a user's reads to the leader for a short window after they write, and monotonic read consistency keeps a user's reads stuck to one replica so data does not appear to travel back in time.
How are write conflicts between leaders resolved?
Last write wins keeps the latest write but can silently lose others. Alternatively the application can merge values, show both to the client, or store a marker for a team member to decide, avoiding data loss at the cost of manual effort.
About this talk
In today's fast-paced business environment, ensuring the availability and consistency of data is crucial for organizations of all sizes. One of the most effective ways to achieve this is through the use of database replication. This talk will provide an overview of the different types of replication available, including master-slave, master-master, and multi-master replication. It will also discuss the benefits and trade-offs of each approach, and elaborate strategies for dealing with issues such as replication lag and conflict resolution. Attendees will leave with a good understanding of how database replication can be used to protect their systems and ensure availability.
Why replicas beat distance: the streaming example (70 s)
Asynchronous replication in one minute (72 s)
The vanishing video: replication lag explained (76 s)
Speaker: Hello. Hi, everyone. Thank you for coming and attending this talk. Firstly, we would like to thank the Women Tech Network team for giving us this wonderful opportunity. We are very excited to talk about data replication, share our learnings with you all, and hope this session is useful. Before we get to the main presentation, let us quickly introduce ourselves. Starting with me. Hi, everybody. I'm Riya Bhatia, and I'm currently working as a software engineer in the FinTech industry. Over the course of my career, I've worked with multiple database systems, databases on cloud, on-prem, MySQL, NoSQL, and have had a wonderful time learning new technologies and implementing and trying that with different database systems.
One thing which I really like about learning and which makes learning even more exciting for me is understanding the whys and hows behind all these things. Apart from this, I'm also very passionate about organizing mentorship and outreach initiatives for women in STEM and giving back to the community in whatever way possible. When I'm not coding or working, I love to play musical instruments like the ukulele and harmonica, and I also like reading books. Over to Tanya.
Hi, everyone. I'm Tanya Snay. I also work as a software engineer in a financial services firm, and I've worked on increasing the performance of database systems both on cloud and on-prem. Apart from this, I keep on learning about diverse fields in technology and have previously dabbled in the fields of robotics and game theory. I am passionate about increasing diversity in tech, and when I'm not working, you can find me either painting, reading, or planning my next trip.
Over to you, Ria. While we've thought that out, I will quickly go over what we're going to cover in this session. We will dive deep in today. We will dive deep in today's application techniques and also witness. Best practices keep in mind when doing so. I hope by the end of this presentation, as I mentioned in my introduction, the why and what, and that makes learning even more fun.
So let's start with the why. Firstly, we need to understand while you are scrolling through all the time. The problem with this, however, is that this data is constantly changing. Firstly, let's talk about why this data matters. This data matters because this is crucial to unlock the insights into customer behavior. Dislikes, your purchasing habits, what top you like on your pizza.
All this earlier is that this data is constantly changing and hard to what really happens is that this data is completely evolving. So no matter the fully overlooked is the ability and consistency, which we focus on. You are constantly generating data in the form of custom coming in place and your team is sitting and making decisions based on that data.
There is a hyper data from different resources and You're already left behind most of your competitors. So to avoid this data data replication It's like having a backup dancer in case your main dancer fails to perform. So it's like having somebody who's always there that data thing goes wrong and it's all sync with the that is the primary database.
And this is called the replica. So, it's like, you know, the data is going to be a little bit more. So, it's going to be a little bit more. While Rhea joins back, I'll share a little bit more. Rhea, could you please unmute yourself? Yes, I apologize for the network issues. Continuing, if data replication is just a backup.
So, no, data replication is not just a backup. It is important to keep data geographically closer to your users. Now, what that means is, suppose you are trying to connect. Taking Netflix example. You're trying to connect to a server from the Americas to UK. You would obviously experience some buffering issues. Because that request is taking that much time to travel.
No matter how efficient your query or your database is. That request, the time it will take to leave your system. Go fetch the data and come back. You can't reduce that. You can only reduce that if that server is located closer to your location. And that is how we reduce the latency. Having different replicas in multiple regions.
One can connect to the closest one. And can easily have a low buffering experience. And a better experience with respect to video streaming. This was just Netflix example. And many such businesses use that. Keeping data geographically closer to your users. Next is, it allows your system to continue working even if some parts have failed. Now you have an application.
You're connected to a server. And suppose something bad happens to that server. That server catches fire. What happens in this case? Of course, you might have a backup for that. But even that backup would take some time to get restored. And it won't have the latest data. Why? Because you are keeping that data separately. And taking that backup from time to time.
But the latest changes are lost. Because they were just written to that server. Having a replica instead solves the issue. If you have a replica with the same set of changes. Which gets replicated as and when the leader is updated. Or when the primary database is updated. The request can directly be handled by that particular server. While you solve the fire situation.
So, your system continues to work even if some parts have failed. Thirdly, it allows us to scale the number of machines. Especially for read intensive applications. Now, right now you have one node. And certain set of people are connected to it. As the number of people grow. As the number of users on your application grow. You would need multiple nodes to serve those read requests.
And putting that pressure on just one database. Could be disastrous for your system. So, having multiple queries. Allows you read replicas. Allows you to send those requests. And handle multiple requests. Without putting pressure or load on just one. Because all of them have the same data. And are already in sync. With this. We talked about the why and what of data replication.
Talking about the techniques. Over to Tanya. So, having understood how replication can help us. Let us see what are the types and techniques of replication. That are available to choose from. The first technique is called the single leader replication. This is also called the master-slave replication. Here the leader can be thought of as the team. Who is delegating instructions to all of the followers.
In this architecture. While all databases can cater to leads from the client. Only the leader can serve a right request. When it receives an instruction from the application. It makes changes to its own copy of the database. And then it forwards the same instruction to its followers. Who can apply these changes to their own respective copies. This raises an important question.
When does the replication actually happen? So, the leader can go about replicating in two ways. First, let us look at asynchronous replication. We can understand this by looking at an example. Of what happens when we receive a transaction. So, in this example. The leader received a transaction to write x is equal to 5. It will respond back to the client.
By making changes to itself. And then at a later point in time. Send the instructions to all of its followers. This makes the system eventually consistent. What this means is that. Eventually, all of the databases will have the same copy of the data. But the client cannot say so with priority. Immediately after receiving back an acknowledgement. So, what does this architecture mean for the client?
Well, next slide. Well, one can expect the right to be very fast. Because we just wait for it to happen on the leader. But because there could be a lag in the data. Reflecting correctly in the followers. The client can end up making stale reads. Also, if the leader goes down. Before having replicated the transactions. It can lead to a potential data loss situation.
So, proper failover mechanisms need to be in place to handle such situations. In order to avoid some of the pitfalls of asynchronous replication. The leader can also choose to replicate synchronously. In this case, when the leader receives the transaction. It will first make sure that all of the followers have performed the same. Before sending back an acknowledgement to the client.
Now, right off the bat. We can see that this will make the rights very slow. Because now all of the databases need to perform the operation. Also, if the leader keeps on waiting for a follower database. That has gone down to actually write the value. We can potentially end up stalling the system all together. And the system becomes not available.
Again, this can be handled by proper care. So, in reality, there's no one-size-fits-all approach. To choosing a synchronization approach for single master database. So, what happens is that we usually end up using a combination of these two approaches. Some databases are kept in sync with the leader. Whereas the other databases are still replicating asynchronously. This will help us get the best of both the world.
But does that solve all of our problems? Well, not really. If your system is write-heavy. Then you are sending all of the rights to one particular leader. And increasing the workload tremendously on the same. Also, if your system is geographically distributed. And you just have one leader. Then clients all over the world will be trying to contact this leader.
In order to perform a ride. And for a client that is located geographically far away from that leader. The network-induced latency will be huge. And the ride becomes slow. The multi-leader approach can solve these issues. So, in this architecture. There can be multiple leaders that are potentially located geographically farther apart. Then the client can connect to a leader that is closest to it.
In order to perform the ride operation. This ride will then be replicated to all of the followers of this leader. And it will also be replicated to other leaders across the world. This helps us maintain a consistent state of the data across the globe. So, with multi-leader replication. We distributed the ride workload amongst various databases. But the situation is not all roses.
With multiple databases undergoing rides. There could be a situation of conflict generation. We will look at it later. And figure out what it means. And how it can be handled. Okay. Yet another approach of replication is the leaderless replication. In the leaderless replication. There is no follower or leader. All of the databases are capable of performing both read and write operations.
So, what happens is that when a client has to perform a write. It sends the instruction to all of the databases. And waits for acknowledgement from some of them. For instance, in this example. The client sends the write operation to all the five nodes. And is waiting for an acknowledgement back from three of the databases. A similar thing needs to be done.
When we are to perform read operation as well. This is also called forum establishment. And it is an advanced concept that is out the scope of this presentation. So, for people who are interested in leaderless applications. They should definitely check out forums. With this, I hand over to Rhea. To demonstrate database replication. Hi. Thank you so much, Tanya.
So, now let's get to the fun part. And see database replication live in action. We will see this using a demo. So, what we have done over here is that. We have started two MySQL servers on different ports. So, you see this one is the master one. And this one is the slave. If you see that we have mentioned that.
Rhea, sorry to break you. You've only shared the Chrome tab. Can we share that actually? Yes, sure. Okay. Is it visible now? Yeah. Thank you, Tanya. So, this is our leader or the master. And this is the slave or the follower. So, what we have done is that we have started two MySQL servers on two different ports.
MySQL does its replication in asynchronous way. Leader to slave. So, that is what we will be demonstrating today. Now, let me show you that we have started. Is the next screen visible? Great. So, you can see that I've started the master on this port. That is 3307. And the slave on 3308. Let's see the current state of our databases.
So, if I do show me select this. This is a table which I've already created in my particular database. And if I want to see what is in this table, let me fire a select statement. And I see, okay, it has ID one and first name as Tanya. Similarly, let's check this for our slave. Okay, right now everything is in sync.
Now, let me create another record for my table. And let's add it and let's see if things get replicated. What I'm basically doing is that I'm writing to the leader and I will be reading from the follower. So, let's insert into test replication. That's the name of my table values. And this time I would be sending it my name.
Okay, so let's check the state of our leader once. If everything got inserted. Great. Now, let's check the state of our replication model. See, we have our record over here also. So, if we make some changes to the leader, those are getting replicated to our slave. That is our follower in this case. So, this is how replication works.
And you can take the advantage of setting backups or keeping your system geographically closed. All the benefits which we have discussed till now. One thing to note here is that till now we have discussed about all the wonderful things of data replication. We have seen how that in action as well. How database replication is happening for MySQL.
As I mentioned, it was asynchronous. But is everything perfect? Of course not. When you're designing large scale applications, a lot can go wrong. There are so many issues when dealing with database replication, which need to be addressed. And at the same time, there are some trade offs which you need to choose. That what fits for your system in that place and at that time.
So, with this, let's talk about the two most common issues which one can face with database replication. One is replication lag. So, till now we have seen that there's this leader and there's the follower. We do our rights to the leader and we are reading from the follower. That is a leader follower based or master slave based replication model.
Now, this helps us to keep many number of leaders and scale the number of readers. So that in case your application is read heavy, the readers can handle all those massive read requests for you. Having a synchronous architecture here won't suit us because that kills the sense of replication. We want that we are able to read from the followers without being dependent on the leader for first replicating the data and then sending it back to the client.
Asynchronous makes sense here that we accept the rights. We replicate it to the followers and they are in sync as in when that happens. The problem with this is that there could be a lag between the leader and the follower. By lag and mean there could be a delay by the leader side to replicate the followers and putting all the data in the followers.
So let's understand this with a quick example. Suppose you're all set and ready to upload your new video to your favorite social media app and you send your video to the leader. The leader says, okay, I have accepted your video and your video is live now. In the background, async replication is happening and it's updating its followers.
But within a couple of seconds, you check again, you check your video again. And this time your read request gets connected to the follower. Till now, the follower hasn't really caught up with the leader and it's still running behind. It still doesn't have the latest changes. So the follower tells you that, no, your video is not there.
This is a potential reflection replication lag scenario where despite receiving the confirmation from the client, you don't see things which you have committed already because you are connected to a different instance, which is not really in sync. In theory, replication lag can take from a few seconds. In theory, actually, there's no time limit to how much this delay would be because it could be because of any issue, because of network issues in between or one node is working on full capacity and it's taking some time to replicate the changes.
So from a few seconds to many minutes, there's no limit to how much replication lag you could experience. Another thing which you can do here is what you are ready to trade off. Maybe as a client, I want to see the information of my latest updates, but your friend could see that same information 30 seconds later. It won't matter, right?
I mean, again, depending upon your business model, there is no right or wrong here. We are discussing a social media scenario over here. So for that one solution could be read your right consistency. What's happening over here is that if a user creates a post and then it tries to read that post after in a short period of time, then all the reads would be directed to the leader only.
Now, again, this kills the essence of application if always all the reads are being handled by the leader. If you're making multiple changes and then all the reads are being handled by the leader, then what is the point of having read replicas? What we can do instead that for like a short time span, like 10 seconds, maybe all the readers, all the reads would be directed to the leader post you create or post you upload something.
And other reads could be taken care of by the follower because they are not linked to this post. Until the time async replication catches up even and that time has passed, this follower would already be up to date with the leader. For other users, again, the right, of course, would be handled by the leader because that's our architecture over here.
And they would also continue to read from the follower in case they haven't created any post, but your post, they might see it after some delay. If that suits your architecture well and good, but there is no right or wrong over here. Another problem with replication lag over here is that suppose your leader, the current state of a value x is changing continuously from x is equal to 1, x is equal to 2, x is equal to 3.
That data is in your leader and in the background, it is getting replicated to your followers. Now, a user tries to read the latest value of x. Right now for him, the value of x is 2. But like in a couple of seconds, he sends another read request and this time value of x is 1. Imagine that you're reading your blog and comments appear, then disappear, then appear, then disappear.
Something is happening, something weird is happening with every refresh. So this is not a very good experience for any user and you are reading data from the past. The solution for this is, is to make the reads stick to just one replica. Like for again, for a certain period of time till the replication catches up, the reads would always be directed to that particular follower so that no, they do not experience this traveling back in time where they are reading faulty or stale values or they are not sure what the actual value is.
Again, for user 2, if they have read this, it will be sticky to this follower only and they would, the read request would again be directed to this particular follower only despite refreshing. So this is called monotonic read consistency. Let's also discuss another issue, another common issue with a database replication that is dealing with conflicts. Now, as Tanya mentioned in, while discussing multi leader architecture, that this is a common issue which one can face, let's understand what that exactly is.
So you have two leaders in different geographical locations and both these leaders are capable of taking in the rights. At one location, your colleague changes something in the database value for customer A. Suppose that customer A's address is updated by this person in region one and similarly, your colleague in region two updates that record for the same customer, but this time they might change the phone number.
Now they have done that, they have committed, the leader has said, okay, well and good. When things get replicated across leaders, this is a potential conflict scenario because we don't know which is the correct value. There's possibility that your application is not in a state to handle the merge conflicts or it could be anything like how exactly in that scenario, which is the correct record that is difficult to figure out. And this is a conflict scenario.
So one possible solution for this is last right wins. What that means is that one of the colleagues, they both have a certain time difference in between their commits to the database and the last right, the one which did the latest one, wins. The problem with this however is, for example, this person did that at one second and this did that at one point a few milliseconds, the last right one would be this one and this person would feel that their rights despite being committed, despite getting the acknowledgement from the client have gotten lost. Another solution for this is manual conflict resolution. What that means is that we leave it up to our application code to decide which one is correct. What our application could do is,
since it was performed on two different values of the same record, it could merge it, maybe, or it could show both the values to the client and the client can decide which one is the correct one or another scenario would be that it creates a marker object in our database. And later on somebody from the team could decide which one is the correct one. This way we prevent data loss and this requires manual intervention.
There are some of the practices which one needs to follow when implementing a successful replication. Over to Tanya for that. Yeah. So with all of the replication techniques that are in our arsenal, it is very important that you carefully choose what needs to be done. So there are some factors that you need to consider. First and foremost comes the workload.
How much data are you generating and how frequently is it changing? This will determine the replication frequency of your system and the method that you choose. You also need to consider consistency requirements. Does your system need to be strongly consistent across replicas at all times? If that is the case, then you will need to choose something that guarantees strong consistency. Also, system architecture becomes something here. Is your system distributed? Are you using a cloud-based or an on-premise system? All these factors will impact your replication approach as these will determine any sort of network latency that you might face. Now, once you have selected a replication method, it is time to implement it properly and in the best way possible. There are some best practices that you need to keep in mind. The first one
is monitoring and alerting. Monitoring the replication process is critical to detecting any fault in your replicas as soon as possible. Setting up alerts will notify you when a replica is down or when there are any replication errors or discrepancies and it will allow you to take action before something bigger happens. Right. Next comes backup and recovery. This should be top of your mind. Your replication process is only as good as your ability to recover from a failure. So, you should have a robust backup and recovery plan to ensure that your data is protected and recoverable in case of a failure.
Then comes testing and validation. Before you actually go ahead and roll out your replication strategy, you should make sure to test and validate it thoroughly. This will identify any potential issues beforehand and ensure that your replication process is running smoothly in production. With that we come to an end of our presentation and thank all of you for attending the same. We hope that you gained some insights on data replication and are excited about using this in your own architecture. If there are any questions, we're happy to answer them or we can also connect offline at the given Twitter and LinkedIn.
Thank you everyone for attending. Please free feel to ask any questions if you have. Again, thanks Women Tech Network for giving us this wonderful opportunity. It was great to talk about one of the topics which we are really passionate about. Okay. In that case, should we end the discussion? Yes. Thank you so much everyone. Do connect if you have any questions.
Thank you. Bye bye.
Transcribed automatically; names checked against the speaker record. Select a time to jump there.
Article based on this talk
How should you replicate a database to stay fast and available?
Ria Bhatia and Tanya Sneh explain replication models, their trade-offs and the fixes for lag and conflicts.
In short
Database replication keeps copies of the same data on several servers so a system stays fast, survives failures and handles more reads. Software engineers Ria Bhatia and Tanya Sneh show that there is no single right setup: single-leader, multi-leader and leaderless designs each trade write speed, consistency and the risk of data loss differently. Their practical message is to understand those trade-offs, plan for replication lag and conflicts, and monitor, back up and test before going live.
Key takeaways
Understand the purpose of database replication and its benefits, including improved performance and reduced downtime.
Use these concepts as a stepping stone to make better design decisions and convey them effectively, even without prior experience in the problem domain.
Why replication is more than a backup
After a stretch of the session lost to network trouble, Ria Bhatia returns with a clear correction to a common assumption: "So, no, data replication is not just a backup." (6:53)
She gives three reasons. First, replicas keep data geographically close to users. Using a video streaming example, she explains that a request from the Americas to a server in the UK takes time to travel no matter how efficient the query, and that the only fix is to place a copy nearer the user: "You can only reduce that if that server is located closer to your location." (8:25)
Second, replication lets a system keep working when part of it fails. If a server catches fire, a traditional backup is slow to restore and misses recent changes: "Of course, you might have a backup for that. But even that backup would take some time to get restored." (9:09) A replica that receives every change as the leader is updated can take over requests while the problem is fixed.
Third, replicas let read-heavy applications scale. Instead of loading one database with every read request, the system spreads reads across several nodes that already hold the same data.
Single leader: fast or safe writes
Tanya Sneh then introduces single-leader replication, also called master-slave replication. Every database can serve reads, but only the leader accepts writes, applies them to its own copy and forwards them to its followers.
The key question is when that forwarding happens. In asynchronous replication, the leader acknowledges the client first and updates followers later, which makes the system eventually consistent. Writes are fast, but clients can read stale data from followers, and if the leader fails before replicating, data can be lost. In synchronous replication, the leader waits for all followers before acknowledging. That makes writes slow, and a follower that has gone down can stall the whole system.
Her conclusion is pragmatic: "So, in reality, there's no one-size-fits-all approach. To choosing a synchronization approach for single master database." (13:26) Many systems combine the two, keeping some followers synchronous and others asynchronous.
Ria then demonstrates this live with two MySQL servers on ports 3307 and 3308. She inserts a record into the leader, reads it back from the follower, and shows it has been replicated, noting that MySQL replicates asynchronously from leader to follower.
Multi-leader and leaderless designs
A single leader becomes a bottleneck when a system is write-heavy or spread across the world, because every write travels to one place. Multi-leader replication lets clients write to the nearest of several leaders, which then replicate to their followers and to each other. Tanya is candid about the cost: "But the situation is not all roses." (14:43) With several databases accepting writes, conflicts can arise.
Leaderless replication removes the distinction entirely. A client sends a write to all nodes and waits for acknowledgements from some of them, for example three out of five, and reads work the same way. She flags quorums as an advanced concept worth exploring separately.
Living with replication lag and conflicts
Ria returns to the most common problems. With asynchronous followers, a user can upload a video, get confirmation from the leader, refresh, hit a follower that has not caught up, and be told the video does not exist. Lag can last seconds or, in theory, many minutes, depending on network issues or overloaded nodes.
The right response depends on the product: "I mean, again, depending upon your business model, there is no right or wrong here." (22:43) For a social media feed, she suggests read-your-writes consistency: for a short window, such as 10 seconds after a user posts, that user's reads go to the leader while everyone else keeps reading from followers.
A second symptom is data that seems to travel back in time when successive reads hit different replicas: "Imagine that you're reading your blog and comments appear, then disappear, then appear, then disappear." (24:23) Monotonic read consistency fixes this by keeping a user's reads stuck to one replica until replication catches up.
In multi-leader setups, two colleagues in different regions might update the same customer record at once, one changing the address and the other the phone number. Last write wins is simple but can silently discard a write the user believed was committed. The alternative is to let the application decide: merge the values, show both to the client, or store a marker so a team member can choose later, which prevents data loss at the cost of manual intervention.
Choosing an approach and running it well
Tanya closes with the factors that should drive the choice: workload (how much data and how often it changes), consistency requirements, and system architecture, including whether the system is distributed, cloud-based or on-premise. Once a method is chosen, three practices matter: monitoring and alerting so failing replicas are caught early, backup and recovery, and thorough testing and validation before production. On the second point she is emphatic: "Your replication process is only as good as your ability to recover from a failure." (29:34)
Watch the talk
Database Replication 101: A Beginner's Guide to Building High-Availability Systems, Ria Bhatia (with Tanya Sneh), 32 minutes: https://www.womentech.net/video/database-replication-101-beginners-guide-building-high-availability-systems
About the speaker
Ria Bhatia is a Software Engineer in the fintech industry who has evaluated multiple database systems with a focus on performance, durability and scalability, and now works on embedded persistent key-value stores. She received the Google Women in Technology Scholarship and the Nutanix Women in Tech Scholarship, mentors aspiring engineers, and co-presented this talk with Tanya Sneh, a software engineer and IIT Kharagpur alumna.
Questions this talk answers
Why isn't a regular backup enough to keep a system available?
What is the difference between synchronous and asynchronous single-leader replication?
When does multi-leader replication make sense?
How can you protect users from replication lag?
How are write conflicts between leaders resolved?
Drafted with AI from the talk transcript. Editor review pending.
Frameworks and ideas mentioned
Single-leader (master-slave) replication
Multi-leader replication
Leaderless replication
Synchronous and asynchronous replication
Eventual consistency
Read-your-writes consistency
Monotonic read consistency
Last write wins
Quorums
Cite this talk
Ria Bhatia. "Database Replication 101: A Beginner's Guide to Building High-Availability Systems." WomenTech Network, 2023. https://www.womentech.net/video/database-replication-101-beginners-guide-building-high-availability-systems