The Basics of Database Sharding and Partitioning in System Design

Поделиться
HTML-код
  • Опубликовано: 13 июл 2024
  • Make sure you're interview-ready with Exponent's system design interview prep course: bit.ly/3YTjsjH
    Learn the basics of database sharding and partitioning in system design with this video! Database sharding and partitioning are both about breaking up a large data set into smaller subsets. Sharding implies that the data is spread across multiple databases, while partitioning usually implies dividing a table into multiple pieces based on some separation criteria. We'll explain the differences between these two concepts and when to use each one.
    Chapters -
    00:00 - Intro
    01:18 - Sharding techniques
    02:43 - Manual vs Automatic sharding
    04:27 - Advantages of sharding
    05:13 - Disadvantages of sharding
    Watch more system design videos here:
    - Meta engineering manager answers a rate limiter interview question: • System Design Mock Int...
    - Google SWE answers an algorithms interview question: • Google Software Engine...
    - Google TPM answers Tiktok system design interview question: • System Design Mock Int...
    - Flipkart EM “Design Amazon Prime Video” system design interview question: • System Design Intervie...
    👉 Subscribe to our channel: bit.ly/exponentyt
    🕊️ Follow us on Twitter: bit.ly/exptweet
    💙 Like us on Facebook for special discounts: bit.ly/exponentfb
    📷 Check us out on Instagram: bit.ly/exponentig
    📹 Watch us on TikTok: bit.ly/exponenttikttok
    ABOUT US:
    Did you enjoy this interview question and answer? Want to land your dream career? Exponent is an online community, course, and coaching platform to help you ace your upcoming interview. Exponent has helped people land their dream careers at companies like Google, Microsoft, Amazon, and high-growth startups. Exponent is currently licensed by Stanford, Yale, UW, and others.
    Our courses include interview lessons, questions, and complete answers with video walkthroughs. Access hours of real interview videos, where we analyze what went right or wrong, and our 1000+ community of expert coaches and industry professionals, to help you get your dream job and more!

Комментарии • 40

  • @tryexponent
    @tryexponent  6 месяцев назад

    Make sure you're interview-ready with Exponent's system design interview prep course: bit.ly/3YTjsjH

  • @jay_wright_thats_right
    @jay_wright_thats_right 6 месяцев назад +18

    Animations to visualize what she is saying would make this video perfect!

  • @chellamgmoorthy
    @chellamgmoorthy Год назад +14

    I didn't knew what a database sharding was. This video gave me good amount of topics for me to research and learn. Thanks for the video!

  • @primalplasma
    @primalplasma 8 месяцев назад +1

    This was exactly the information that I needed. Thank you!

  • @ayushgogna9732
    @ayushgogna9732 5 месяцев назад

    you guys are amazing i recently found your channel i am learning a lot and i am loving it

  • @cristinasanchez9029
    @cristinasanchez9029 8 месяцев назад

    Greatly explained, I subbed

  • @octavian0704
    @octavian0704 11 месяцев назад +3

    very well described, thanks for sharing.

  • @user-fg2iw4yi7q
    @user-fg2iw4yi7q 4 месяца назад

    Great video!

  • @user-kn2bs5mu7b
    @user-kn2bs5mu7b 4 месяца назад +1

    Some people are very beautiful with a helping hand , thanku❤

  • @vladyslavsosnov8412
    @vladyslavsosnov8412 Год назад

    Awesome, thanks

  • @MuhammadAsif-nx7om
    @MuhammadAsif-nx7om Год назад +10

    Great and to the point explanation, No bluff
    Thanks

  • @josephkabemba3211
    @josephkabemba3211 Год назад +2

    Crystal clear

  • @devkiosk
    @devkiosk Год назад +3

    Awesome explanation.

  • @Deepz007
    @Deepz007 9 месяцев назад +2

    Great video on sharing, but partitioning wasn't mentioned or discussed.

  • @oefzdegoeggl
    @oefzdegoeggl 8 месяцев назад +2

    a few things to add. i prefer partitioning based on a guaranteed key in the sense it will not distribute badly ... so the "first letter of name" is a bad idea. better use the record id and group 100k of them or what into a partition. then before storing partitions on different servers, there are a few more things to do first. one is to split modifying queries from read-only queries (which has to be done on the application level) so a simple read-replica-server (which is trivially to be setup in postgres) can be used. next what is possible is a db split on the logical level. i mean for example keep the user's core data on db1 and chat messages on db2. leaving out foreign keys and using weak references instead, with a periodic cleanup job that resolves broken links is a good idea, eliminating issues on backup restore when cut in a bad moment as well.

    • @goofballbiscuits3647
      @goofballbiscuits3647 3 месяца назад

      Coming from a decade+ of data work with health records, I have to bump this comment. Name, location and birthdate combined still aren't unique. Messing up data with potential tromps like this is straight up lethal in some fields.
      Remember, friends: bad data is worse than no data.

  • @robbybankston4238
    @robbybankston4238 5 месяцев назад

    I would think that another potential disadvantage would be if you are using commercial rather than OpenSource operating systems or databases where the licensing costs increase as the number of servers increase also.

  • @netspie
    @netspie 23 дня назад

    Just memorize every word and say in the job interview.. unbelievable..

  • @pieter5466
    @pieter5466 7 месяцев назад +1

    Good video but confusing use of the term 'partition', which is different than 'shard'.

  • @mandydawson6199
    @mandydawson6199 Год назад +7

    Who is she and how do we get more videos with her?

  • @edmoregosha8937
    @edmoregosha8937 3 месяца назад +1

    The video script explains the basics of database sharding and partitioning in system design. It discusses how sharding can help manage large amounts of data by breaking it up into smaller partitions spread across multiple servers. The script also highlights the advantages and disadvantages of sharding in terms of scalability, performance, and operational complexity.
    Key moments:
    00:32 Traditional databases encounter limitations with increasing data size, necessitating sharding to enhance scalability and performance.
    -Geobase sharding partitions data based on user locations, reducing latency by routing users to the closest node.
    -Range-based sharding divides data by key value ranges, simplifying partition computation but potentially leading to uneven splits.
    -Hash-based sharding uses hashing algorithms to evenly distribute data across partitions, reducing hotspots but potentially separating related rows.
    -Automatic sharding dynamically manages data partitioning for higher performance and scalability, but manual sharding at the application layer increases development complexity.
    03:55 Sharding enables scaling, faster queries, and system availability, but poses challenges like complex management, hot spots, and high operational costs.
    -Advantages of sharding include scalability, faster queries, and improved system availability during outages.
    -Disadvantages of sharding involve complex data relationships, potential hot spots, and operational costs for maintaining high availability.
    Generated by sider.ai

  • @caitlinmclaren2695
    @caitlinmclaren2695 10 месяцев назад

    Monolithic Databases??

  • @rmuneeb1
    @rmuneeb1 2 месяца назад

    Untill her hands moved I thought she was an AI robot 😂

  • @marcello4258
    @marcello4258 Год назад +1

    It sounds you messed up partitioning with sharding.
    And commodity hardware does not have ECC - don’t run a db on it.

    • @mick7827
      @mick7827 9 месяцев назад

      Each partition is stored within the same database server SO it's easier because sharding require multiple database servers ?

  • @sriranjitharaghuraman1646
    @sriranjitharaghuraman1646 6 месяцев назад

    Some visualization would have gone a long way

    • @tryexponent
      @tryexponent  5 месяцев назад

      Thanks for the feedback!

  • @goofballbiscuits3647
    @goofballbiscuits3647 3 месяца назад +2

    Sorry, everyone...
    I parted *_and_* sharded 😢

  • @lakshminarayanacharan837
    @lakshminarayanacharan837 2 месяца назад

    You are looking so cute 🥰

  • @AvinashRaj
    @AvinashRaj Год назад +47

    Well thanks for reading the script.

    • @vivekkaushik9508
      @vivekkaushik9508 4 месяца назад

      😂😂😂

    • @codermccoderson
      @codermccoderson 3 месяца назад +5

      A lot of these YT educators write down the material before speaking to the camera. What’s your point?

    • @daphenomenalz4100
      @daphenomenalz4100 20 дней назад +1

      Every single youtuber has to be prepared bruh, they can't just speak everything from mind and stutter when thinking :|
      It's not a reaction video

  • @satvikkhare1844
    @satvikkhare1844 Год назад +8

    reading for a teleprompter is not teaching!! sure it gave me topics that I can refer myself

    • @codermccoderson
      @codermccoderson 3 месяца назад

      A lot of youtube educators have their material scripted before speaking to the camera? What’s your point?

  • @sk-vs9nt
    @sk-vs9nt Месяц назад

    am in love with this lady what her id

  • @user-qq3gh5pg9f
    @user-qq3gh5pg9f 4 месяца назад

    you got the definition of Sharding wrong. understood you never did sharding in your life.