Database Replication Explained | System Design Interview Basics

แชร์
ฝัง
  • เผยแพร่เมื่อ 7 ธ.ค. 2024

ความคิดเห็น • 29

  • @hafizmfadli
    @hafizmfadli 4 หลายเดือนก่อน +1

    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

    • @big_tech_coach
      @big_tech_coach  4 หลายเดือนก่อน

      Awesome to hear that it was that helpful to you!

  • @Spade2351
    @Spade2351 ปีที่แล้ว +1

    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

    • @fabianhinsenkamp613
      @fabianhinsenkamp613 ปีที่แล้ว

      Thank you, that's very kind! 😋

    • @Spade2351
      @Spade2351 ปีที่แล้ว

      @@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

    • @big_tech_coach
      @big_tech_coach  ปีที่แล้ว

      Glad it was helpful!

  • @nehasinghal9772
    @nehasinghal9772 8 หลายเดือนก่อน

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

  • @_domdge_687
    @_domdge_687 2 หลายเดือนก่อน +1

    deym. You just teach the main idea of distributed system than my college professor. Thanks random person

  • @ZawmyoHtet-lg7jn
    @ZawmyoHtet-lg7jn 4 หลายเดือนก่อน +1

    Thank you so much, Sir.

  • @brianligat9493
    @brianligat9493 9 หลายเดือนก่อน

    Very well and clearly explained

  • @AhmedShoulah
    @AhmedShoulah 2 หลายเดือนก่อน +1

    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?

    • @big_tech_coach
      @big_tech_coach  2 หลายเดือนก่อน +1

      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.

  • @inderjitsingh2341
    @inderjitsingh2341 ปีที่แล้ว +1

    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?

    • @big_tech_coach
      @big_tech_coach  ปีที่แล้ว +2

      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.

    • @inderjitsingh2341
      @inderjitsingh2341 ปีที่แล้ว +1

      ​@@big_tech_coachUnderstood! Thank you so much for replying!

  • @nilsfrahm1323
    @nilsfrahm1323 ปีที่แล้ว +3

    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.

  • @jibin7277
    @jibin7277 2 ปีที่แล้ว +3

    Excellent content. You need more viewers

    • @big_tech_coach
      @big_tech_coach  2 ปีที่แล้ว +1

      Thank you Jibin! I am working on it 😉

  • @ahmedroma8697
    @ahmedroma8697 8 หลายเดือนก่อน

    Thank you man

  • @jibranjaved6165
    @jibranjaved6165 ปีที่แล้ว

    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?

    • @big_tech_coach
      @big_tech_coach  ปีที่แล้ว +1

      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.

  • @mohamedmoideen2061
    @mohamedmoideen2061 ปีที่แล้ว +1

    Once Report Manager Started, then replication is initialised.

  • @jayshah5695
    @jayshah5695 2 ปีที่แล้ว +3

    volume too low

    • @big_tech_coach
      @big_tech_coach  2 ปีที่แล้ว

      Thanks for pointing that out jay! I fix it for the next one.