System design interview: Database Scaling

Поділитися
Вставка
  • Опубліковано 24 лип 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.

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

  • @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 8 місяців тому

      "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.

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

  • @bibs2091
    @bibs2091 2 роки тому

    Thank you this was very useful intro the database scaling

  • @sergeialimov401
    @sergeialimov401 8 місяців тому

    Thanks for the 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!

  • @TalalJawaid916
    @TalalJawaid916 Рік тому +2

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

  • @boringmanager9559
    @boringmanager9559 Рік тому

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

  • @iuliusmihaiboiangiu6243
    @iuliusmihaiboiangiu6243 Рік тому

    Super video.

  • @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 :(

  • @jacks5349
    @jacks5349 Місяць тому

    C is "consistency"

  • @maroben225
    @maroben225 5 місяців тому

    Bro the C stands for Consistency !

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