System design interview: Database Scaling

แชร์
ฝัง
  • เผยแพร่เมื่อ 9 ก.ค. 2024
  • ► WATCH LIVE: twitch.com/johncodes
    ► Twitter: / johncodezzz
    ► Home page: johncodes.com
    ► Email me: hello@johncodes.com
    Database scaling questions are some of the most complicated ones you'll be asked in a system design interview. In this video, we will cover the various topics and broad strategies for database scaling.
    #johncodes
    🚀 SUMMARY:
    Scaling databases are no trivial manner. Especially when you need to scale them up to millions (if not billions) of users. At a global scale, you'll have to consider geo-political implications, but we'll also be covering horizontal vs vertical scaling, manager / worker models, sharding, partitions, and using data centers. Best of luck in your software engineer interviews!
    ⏰ TIMESTAMPS:
    00:00 Intro
    00:36 ACID
    03:16 Single server
    05:50 Multiple databases
    06:48 Manager / Worker
    08:39 Circle
    10:51 Quick note on caching layers
    12:39 Partitions
    15:22 Sharding
    17:07 Datacenters
    20:00 Separate read / write layers
    20:53 SaaS
    🎵 MUSIC CREDITS:
    - Yasumu - Recharge
    - Provided by Lofi Records
    - Watch: • Yasumu - Recharge
    - Download/Stream: fanlink.to/3amstudysession
    🤔 About:
    Hi all, I’m John, an experienced software engineer and open source software enthusiast / contributor. I make fun and informative videos about tech, engineering, productivity, and life! Like, comment, and subscribe for more!
  • วิทยาศาสตร์และเทคโนโลยี

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

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

    Good luck all with your system design interviews!! 🚀

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

    This video is much more detailed than the others I watched. Good job.

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

    Really great walkthrough. Clear, concise and decent white boarding. Now the manager/worker terminology was throwing me off for a minute like “is he meaning master/salve DBs?” 😂. I work at FAANG and get it, our blacklist (I mean “not allowed list”) of technical terms grows daily but it still throws me off.

    • @khalidhussien6764
      @khalidhussien6764 2 หลายเดือนก่อน

      Yeah, I thought he was just being too liberal, but I get it now.

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

    The 2nd one is actually "Consistency", which is different from correctness. Correctness can only be guaranteed by the app code (written by a developer).
    Consistency means that everything written by a transaction must be valid, e.g. constraints, cascaded triggers, or any combination thereof. Sorry, cannot give you thumbs here but I will not give you a downvote either. So, better luck next time :).

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

      Thanks for the correction!!!

    • @frenchmarty7446
      @frenchmarty7446 7 หลายเดือนก่อน

      "Correctness" is also correct and sometimes used though less often than "consistency."
      Correctness can mean different things in different contexts or levels of abstractions. Its valid to talk about the database enforcing "correctness" (in terms of database constraints) separately from "correctness" in the application logic.
      "Consistency" is often conflated with the CAP theorem sense. "Correctness" (conformity to some model) is closer to what the C in ACID is actually supposed to represent.

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

    Awesome video man, really love the channel and content. Keep it coming please!!

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

      Thanks much! Planning to do more!! Hopefully time allows 😅

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

    My man knows so much about databases, but only so few people can appreciate

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

    Can't believe this doesn't have 100k+ views, this is great stuff, thank you!

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

    Thanks for the video!

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

    Thank you this was very useful intro the database scaling

  • @jacks5349
    @jacks5349 26 วันที่ผ่านมา

    C is "consistency"

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

    Super video.

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

    Please make more system design videos. your explanation is super

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

      Thanks much! I'll do my best!

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

    Bro the C stands for Consistency !

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

    Why didn't mention RabbitMQ for queuing ? Could be beneficial too

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

    Man could you continue with this series?

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

      I'll try! I've been very busy :(

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

    Atomicity

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

    So the answer is what's the most scale approach to database if I use both mysql and nosql? For example like Instagram how they approach their database scaling??? Any engineer working at Instagram can answer me? 🤣

  • @goforshahriar
    @goforshahriar 3 ปีที่แล้ว

    Design a Telemetry System

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

      Good idea!!!!

    • @goforshahriar
      @goforshahriar 3 ปีที่แล้ว

      @@JohnCodes looking forward