An 8-week online learning program designed to help software developers in Sub-Saharan Africa develop practical knowledge on Google Cloud Platform.
RSVP to join the 29th August - 30th October 2024 class. Registration closes on 26th August 2024.
Sign up: https://t.co/BgesUfIu3R
I am grateful to @gdsc_chukauni for organising this event. It was really an informative session where I learned about the creation, use, and consumption of APIs.
Calling all Angular experts and beginners! We are looking for speakers to share knowledge and best practices on Angular and related topics. Proposals are welcome by 15th September 2023.
Submit your proposal now: https://t.co/w1RjTYBtpn
#AngularKenya#Webinars
A Quick Introduction to Database Replication🚀
It basically involves keeping copies of your data on multiple machines.
Why is this useful?
- Replication increases the safety of your data.
- Also, replication improves the availability & scalability of your system
Here's what it looks like:
But how does replication really work?
In the below diagram, we have 3 replicas - 1 green and 2 yellow
Every write to the database must reach every replica.
The most common approach is Leader-Based Replication.
AKA as Active/Passive or Master-Slave Replication.
Here, green is the Leader & others are followers
Here are the steps in a Leader-Based Replication setup:
- Clients send their write requests to the leader node.
- The leader writes new data to its local storage
- The leader also sends the data change to all its followers in the form of a replication log
- Each follower reads the log & updates its local copy of the database
- When a client wants to read data, it can send a query to the leader of any of the followers.
- Load balancers handle this automatically
👉 Types of Replication
There are two main types of replication:
- Synchronous
- Asynchronous
✅ In Synchronous Replication, the leader waits until all followers have confirmed that they have received the write.
This guarantees that followers will have an up-to-date copy of the data.
But it also means that the whole system goes down if one follower is not available.
✅ In Asynchronous Replication, the leader sends the updates to the followers but does not wait for a response from the follower.
This makes the leader free to process new write operations.
But it comes at the cost of a write operation not guaranteed to be durable even if confirmed to the client.
👉 The Need for Replication
Some important reasons why database replication is needed:
- Data is always there for you. Safe & Secure
- You can scale based on demand
- Data can stay close to the users
- No instance gets overburdened
- Backup in case things go south
In fact...replication can bring your data back even from the Thanos Snap.
===
That's all for now!
If you enjoyed this Introduction to Database Replication, what are you waiting for?
- Go ahead and obliterate the LIKE button
- REPOST/RETWEET so that no one loses their data
- Follow me for more stuff like this.
Your contribution helps improve Google products for our local community .
Download the app from https://t.co/yXukoIkCOm and be part of #GoogleCrowdSourse community.
@TabithaKavyu@gdsc_chukauni
@KenyaPower_Care Blackout in Mukuyuni area for 3 weeks now. Schools have opened and we have Mukuyuni Girls boarding Sec school just in the Mukuyuni Market of Bungoma North. Kindly consider the girls' security.