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
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
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?
Thank you very much! Let me answer your questions : Replication & Sharding: It's crucial for devs to understand these, even if databases handle them. Design impacts efficiency. Some apps might need custom sharding for unique control. SQL vs. NoSQL Replication: SQL often uses master-slave; writes go to master, then replicate to slaves. NoSQL varies: some are peer-to-peer, some use primary-secondary. NoSQL often focuses on availability. Multiple Writes to Master: Databases use locking for consistency. In multi-master setups, conflicts can arise, leading to strategies like "last write wins" or requiring resolution.
What is the best approach for multi branch store "like pharmacies chain" to consider each branch should have read write database and know the stock in other branches?
Great question Ahmend! Each branch can have its own read/write local database with real-time or near real-time sync to a central database. Use distributed databases like Couchbase or Cosmos DB for multi-branch data replication, ensuring stock info stays updated across all locations.
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.
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?
Hi Jibran :-D Good questions! main-replica strategies are typically configured on database level. Routing is not a concern to application level design. You wouldn't manually define which node to address for reads or writes, that all happens on system level.
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
Awesome to hear that it was that helpful to you!
You are doing great job... keep creating the content related to database. Well explained replication to shards.
Thank you, I will
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
Thank you, that's very kind! 😋
@@fabianhinsenkamp613 no ty! I have a systems interview in 2 hours and your videos are covering a ton of points the recruiter told me to study up on
Glad it was helpful!
Thank you so much, Sir.
Very well and clearly explained
Glad you liked it
deym. You just teach the main idea of distributed system than my college professor. Thanks random person
Thank you!
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?
Thank you very much! Let me answer your questions :
Replication & Sharding:
It's crucial for devs to understand these, even if databases handle them. Design impacts efficiency. Some apps might need custom sharding for unique control.
SQL vs. NoSQL Replication:
SQL often uses master-slave; writes go to master, then replicate to slaves. NoSQL varies: some are peer-to-peer, some use primary-secondary. NoSQL often focuses on availability.
Multiple Writes to Master:
Databases use locking for consistency. In multi-master setups, conflicts can arise, leading to strategies like "last write wins" or requiring resolution.
@@big_tech_coachUnderstood! Thank you so much for replying!
What is the best approach for multi branch store "like pharmacies chain" to consider
each branch should have read write database and know the stock in other branches?
Great question Ahmend! Each branch can have its own read/write local database with real-time or near real-time sync to a central database. Use distributed databases like Couchbase or Cosmos DB for multi-branch data replication, ensuring stock info stays updated across all locations.
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.
True that!
Excellent content. You need more viewers
Thank you Jibin! I am working on it 😉
Thank you man
You're welcome!
Once Report Manager Started, then replication is initialised.
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?
Hi Jibran :-D Good questions! main-replica strategies are typically configured on database level. Routing is not a concern to application level design. You wouldn't manually define which node to address for reads or writes, that all happens on system level.
volume too low
Thanks for pointing that out jay! I fix it for the next one.