What is Database Sharding?

Sdílet
Vložit
  • čas přidán 11. 06. 2024
  • Database sharding is a technique used to optimize database performance at scale. It relies on separating data into logical chunks so that they can be separated and queried independently. Learn more about sharding in this video.
    Looking to get hands on experience building on AWS with a REAL project? Check out my course - The AWS Learning Accelerator! courses.beabetterdev.com/cour...
    📚 MY RECOMMENDED READING LIST FOR SOFTWARE DEVELOPERS📚
    Clean Code - amzn.to/37T7xdP
    Clean Architecture - amzn.to/3sCEGCe
    Head First Design Patterns - amzn.to/37WXAMy
    Domain Driver Design - amzn.to/3aWSW2W
    Code Complete - amzn.to/3ksQDrB
    The Pragmatic Programmer - amzn.to/3uH4kaQ
    Algorithms - amzn.to/3syvyP5
    Working Effectively with Legacy Code - amzn.to/3kvMza7
    Refactoring - amzn.to/3r6FQ8U
    🎙 MY RECORDING EQUIPMENT 🎙
    Shure SM58 Microphone - amzn.to/3r5Hrf9
    Behringer UM2 Audio Interface - amzn.to/2MuEllM
    XLR Cable - amzn.to/3uGyZFx
    Acoustic Sound Absorbing Foam Panels - amzn.to/3ktIrY6
    Desk Microphone Mount - amzn.to/3qXMVIO
    Logitech C920s Webcam - amzn.to/303zGu9
    Fujilm XS10 Camera - amzn.to/3uGa30E
    Fujifilm XF 35mm F2 Lens - amzn.to/3rentPe
    Neewer 2 Piece Studio Lights - amzn.to/3uyoa8p
    💻 MY DESKTOP EQUIPMENT 💻
    Dell 34 inch Ultrawide Monitor - amzn.to/2NJwph6
    Autonomous ErgoChair 2 - bit.ly/2YzomEm
    Autonomous SmartDesk 2 Standing Desk - bit.ly/2YzomEm
    MX Master 3 Productivity Mouse - amzn.to/3aYwKVZ
    Das Keyboard Prime 13 MX Brown Mechanical- amzn.to/3uH6VBF
    Veikk A15 Drawing Tablet - amzn.to/3uBRWsN
    🌎 Find me here:
    Twitter - / beabetterdevv
    Instagram - / beabetterdevv
    Patreon - Donations help fund additional content - / beabetterdev
    📚 References:
    Great Sharding Article - aws.amazon.com/blogs/database...
    #Databases
    #Sharding
    #SoftwareEngineer

Komentáře • 205

  • @RandomShowerThoughts
    @RandomShowerThoughts Před rokem +14

    honestly might be the most complete and thorough explanation of sharding.

  • @hamadaparis3556
    @hamadaparis3556 Před 2 lety +71

    You've simplified your explanation like google engineers do when they give lectures, I'm sorry if that sounds strange but I've realized that the people who simplify complex things they really know what they are doing awesome man Cheers.

  • @Aidanhyland
    @Aidanhyland Před 3 lety +20

    I am burning through all your videos. You are making me a better SAAS Test Engineer! Keep up this great work!

  • @v.m.5850
    @v.m.5850 Před rokem

    Watched countless videos and barely understood the concept. Your video on the other hand explained everything along with pros and cons super simply. Thanks a ton.

  • @abhishekghosh5550
    @abhishekghosh5550 Před rokem +9

    This is seriously such a great video man. I spent the entire Sunday understanding Sharding. Not that I didn't get started with the concept, however, this video just made everything clear at the end of the day. Thank You.

  • @yfzhangphonn
    @yfzhangphonn Před rokem +1

    Best lesson about database scalability I found, so easy to understand.

  • @poloska9471
    @poloska9471 Před 2 lety +6

    Dude you make some really awesome content. Please please keep making videos! I love the clarity of your speech, voice, and presentation. I understand and can follow along in your videos a lot better than more other channels. Earned my subscription and likes! Keep killing it homie!

    • @BeABetterDev
      @BeABetterDev  Před 2 lety +1

      Thank you so much for your kind words and welcome to the channel!

  • @dannydatt
    @dannydatt Před 3 lety +3

    Network guy trying to get an understanding in a different field. That's an outstanding walk-through and very much appreciated. Thank you for your work and quality presentation.

  • @bharat_arora
    @bharat_arora Před 2 lety +3

    Finally found some decent content over this topic. I already had an idea on this topic just wanted to revise it. Thanks a lot for making the insightful videos.

  • @quangluu79
    @quangluu79 Před 10 měsíci

    Good stuff man. I love the clarity you bring to a subject. Subscribed.

  • @wlcheng
    @wlcheng Před rokem +1

    Great video! Such a clear explanation of how database sharding works.

  • @Alexan6548
    @Alexan6548 Před rokem

    Very clear. One of the best tutorial I have ever seen

  • @ase713
    @ase713 Před 2 měsíci +1

    Dude, this was outstanding! Super helpful and covered everything I needed to know!

  • @cd92606
    @cd92606 Před 3 lety +11

    Great video, especially your description about the non-uniformity problem.

    • @BeABetterDev
      @BeABetterDev  Před 3 lety +1

      Thanks Rotary Dialer! Yea the non-uniformity issue is one I've been personally bitten by in the past. Glad you enjoyed the video!

  • @ihateorangecat
    @ihateorangecat Před rokem

    Best of the best explantion I kinda start to understand the Sharding in just video.Thank You and I subbed!

  • @mathisinav4267
    @mathisinav4267 Před 2 lety

    Hands down! the best explanation I've seen on database sharding, excellent!

  • @ChauDuong1982
    @ChauDuong1982 Před 3 lety +3

    Thanks for the videos. Great explaination.

  • @saiaussie
    @saiaussie Před 3 měsíci

    Hey dude, you're a star! Very clear and upto the point! I cant thank you enough.

  • @Bhaskarlnm
    @Bhaskarlnm Před 2 lety +2

    Daniel, no words.. looking at your playlists content and videos …amazing. Great great effort to help people. Kudos to you 👏👏👌👌👌

  • @patrick1778
    @patrick1778 Před 2 lety

    you are so good at explaining concepts

  • @harishbendale6818
    @harishbendale6818 Před 11 měsíci

    Very clear, and simple explanation.

  • @eternalnight9453
    @eternalnight9453 Před 3 lety +2

    New here. Loved your talk! Your presentation and teaching is elegant and simple.
    Really appreciate it, thank you!

  • @nodrift9503
    @nodrift9503 Před rokem

    Perfect explanation. Thank you

  • @codespace747
    @codespace747 Před 2 měsíci

    Best video ever made on sharding

  • @willemplug3366
    @willemplug3366 Před rokem

    Super clear. Thank you!

  • @filesopen6188
    @filesopen6188 Před 2 lety +2

    this video entails very good explanation and this also entails complex understanding.

  • @antonrozhansky7254
    @antonrozhansky7254 Před 3 lety +2

    Great explanation, Daniel. Thank you

  • @OscarMartinez-nt6zn
    @OscarMartinez-nt6zn Před 2 měsíci

    Great explanation!

  • @panggrayta
    @panggrayta Před 3 lety +1

    woww...!! great videos, great presentation, great explanation. thank you, keep sharing..

  • @Lordnoashi
    @Lordnoashi Před rokem +1

    Amazing explanation, loved it. Thank you, it will help for the future interviews I have.

  • @lucasarbex926
    @lucasarbex926 Před 2 lety +2

    Great content man!! It helped me a lot!! Keep up with the good work!

  • @sharonleibel
    @sharonleibel Před 2 lety +1

    Great explanations! Thanks, Keep it coming!

  • @AnilKumar-lb3qf
    @AnilKumar-lb3qf Před 2 lety

    Excellent presentation, very good explanation 👍👍

  • @user-zr4jl4ms3v
    @user-zr4jl4ms3v Před 2 lety +1

    best explanation of sharding i've heard!

  • @rjjlucy
    @rjjlucy Před 3 lety +4

    In most ~20min videos, I get tired soon and close them after 5min. I can’t believe your video is so good that I totally forgot time and finish watching all of it

    • @BeABetterDev
      @BeABetterDev  Před 3 lety +1

      Thank you so much Jingyi! Its these kinds of comments that keep me motivated to make more content :)
      Stay safe
      Daniel

  • @francoisbourdages2906

    très bien expliqué, merci

  • @jackforcecity
    @jackforcecity Před 2 lety +1

    Great job. Very well explained!!!

    • @BeABetterDev
      @BeABetterDev  Před 2 lety

      Thanks so much Jackson! Glad you enjoyed :)

  • @taniaasim
    @taniaasim Před 2 lety +1

    This is great and super clear. Thank you!

  • @arikedada
    @arikedada Před rokem

    great video, I understand what idempotency operations entails, thank you

  • @santoshlml
    @santoshlml Před 3 lety +2

    Well explained. Thank you!!

    • @BeABetterDev
      @BeABetterDev  Před 3 lety

      You're very welcome Santosh! Glad you enjoyed.

  • @estebanquintana156
    @estebanquintana156 Před 2 lety

    Great explanation. Thank you

  • @devdewboy
    @devdewboy Před rokem

    Thanks for the straight forward easy to grasp concept of sharding. Give this to someone else and we would have gotten a bunch of technical wordy mumbo-jumbo.

  • @shubhamchandra9258
    @shubhamchandra9258 Před rokem +1

    Awesome video. Very clearly explained.

  • @rajt1998
    @rajt1998 Před 2 lety +1

    Very well explained. Thank you

  • @jeevaengg
    @jeevaengg Před rokem

    good explanation!!

  • @dorbenmoyal7639
    @dorbenmoyal7639 Před 2 lety +1

    Great explanation..! Thanks 🙏🏼

  • @duzgunkenan
    @duzgunkenan Před měsícem

    Great content, thank you

  • @JamesQQuick
    @JamesQQuick Před 2 lety +1

    This was awesome. Thanks!

  • @RajuGupta-st1hj
    @RajuGupta-st1hj Před 2 lety +1

    Thank you so much for the post.
    Good work.
    Keep it up.

  • @JayPatel12928
    @JayPatel12928 Před 2 lety +5

    Watched some of your random videos on sys design, and now im hooked. Great content!

  • @rschmidtzalles
    @rschmidtzalles Před 3 lety +1

    clear and concise. subscribed

  • @chandnisaini9176
    @chandnisaini9176 Před 2 lety +1

    Well explained!!

  • @kishoretvk
    @kishoretvk Před 2 lety

    Great vidoe, keep up the good work

  • @user-ws5xs1nv4p
    @user-ws5xs1nv4p Před rokem

    Thanks a lof for this video!

  • @eugeniosp3
    @eugeniosp3 Před 2 lety

    Bro I'll watch anything you make. If you made a video teaching me how to watch paint dry I'd take notes. Keep up the damn good work my mans.

  • @hpandeymail
    @hpandeymail Před 2 lety +1

    Very well formed content .. thanks 🙏

  • @kgcpk
    @kgcpk Před 2 lety

    Superb explanation 😍

  • @SofiaGoyal
    @SofiaGoyal Před 2 lety +1

    Really good work man... such a detailed video...

  • @itiscinnamoncafe
    @itiscinnamoncafe Před 8 měsíci

    Love longer videos ❤

  • @rayprusia4753
    @rayprusia4753 Před 2 lety +1

    Your videos are awesome! Thanks

  • @simonemariottini1011
    @simonemariottini1011 Před 2 lety +1

    Really useful content! Keep it up!

  • @milequinze
    @milequinze Před 2 lety +1

    Awesome! Thanks a lot!

  • @tamaraamanda2483
    @tamaraamanda2483 Před 2 lety

    Prepping for Amazon TPM interview and this is so helpful!

    • @BeABetterDev
      @BeABetterDev  Před 2 lety

      Thanks Tamara and good luck on your interview! Make sure you focus on those leadership principles !

  • @user-tu1kf6xd8d
    @user-tu1kf6xd8d Před 3 lety +1

    great explanation thank u so much

  • @sandrojorgeoliveira175
    @sandrojorgeoliveira175 Před 10 měsíci

    Thank you, Dude!!!

  • @mivel9763
    @mivel9763 Před 2 lety +1

    Had a hard time grasping on what database sharding actually meant but your video really helped me understand it, thanks! :)

  • @random-characters4162

    God bless you, sir ✌️

  • @3042640426
    @3042640426 Před rokem

    Thank you so much

  • @trantrongty8065
    @trantrongty8065 Před 2 lety +1

    Thank you that really helpful great video

  • @donaldkennedy7993
    @donaldkennedy7993 Před rokem

    superb explanation of DB scaling & sharding & W/R databases for a non DB person ;)

  • @drummerboi4eva
    @drummerboi4eva Před rokem

    excellent video

  • @markryan430
    @markryan430 Před rokem +1

    OMG, I just Sharded myself!

  • @andrewkicha1628
    @andrewkicha1628 Před 11 měsíci

    Great job on this one, I came here to know more about sharding, but I learned lots of useful information before you even dived into the topic ;)

  • @samlinsell900
    @samlinsell900 Před 2 lety +5

    Vids are awesome, really enjoy them. Interesting that you didn't touch on the lack of thought to database design, indexing and maintenance etc as a way to improve performance. Interested to know why? Especially given the cost of scaling in serverless environments.

  • @rishiraj2548
    @rishiraj2548 Před rokem

    Thanks

  • @gulsimsek7988
    @gulsimsek7988 Před 3 lety

    thank you!

  • @shivakumarranjithn5584
    @shivakumarranjithn5584 Před 3 lety +1

    Great content!

  • @vikasravindran1312
    @vikasravindran1312 Před 2 lety

    Excellent !

  • @geekaffairs6475
    @geekaffairs6475 Před 2 lety +1

    very well explained

  • @royal4210
    @royal4210 Před 2 lety

    Thank you programmer charlie

  • @skmahaboobbasha6059
    @skmahaboobbasha6059 Před 2 lety

    Great vedio please make vedio on opsmanager installation on production environment

  • @fethicetin9186
    @fethicetin9186 Před 3 lety

    Thanks for the video

  • @drew4980
    @drew4980 Před 3 lety +7

    Are there any database tools that make this easier? Couldn't someone write some software to create a wrapper around a sharded DBMS that could handle the routing and re-sharding with a given hashing key?

  • @hualiang2182
    @hualiang2182 Před 2 lety

    Nice tutorial. Wonder in real word scenairo, is the routing layer something sits in the application code or it's implemented on the database side?

  • @swaroopas5207
    @swaroopas5207 Před 2 lety

    Great video! But how do we handle foreign keys in sharding?

  • @peterroger249
    @peterroger249 Před rokem

    Much thank you for your great CZcams help. I am new to Excel and Chatbot. How can I migrate the Excel database, export it from Microsoft Azure WebApp, and import it into AWS Chabot? Keep having errors missing QID and others on the AWS Chabot console. Please help show me the fastest way to convert the Excel and make it compatible with AWS Chatbot?

  • @ibrahimkoz1983
    @ibrahimkoz1983 Před 2 lety +1

    You're great.

  • @subhasishhalder4817
    @subhasishhalder4817 Před 2 lety +2

    How come I didn't find your channel before?

  • @alexeykorovko6704
    @alexeykorovko6704 Před rokem

    very good explanation, thank you
    one point is not clear - do we really have advantage of availability / fault tolerance, in case we have an intermediate layer that routes the requests? for me it is like the same, isn't it?

  • @mohamedyoussef8835
    @mohamedyoussef8835 Před rokem

    Awesome video +++++++++++ 🙂

  • @HeavensMeat
    @HeavensMeat Před 3 lety +1

    I know you have had other dynamodb videos here but would it be possible to have a more in depth video dealing with sharding in dynamodb and also utilizing this with python/boto3 vs the cli? I know it's not really the same type of sharding per se but this video reminded me that I am interested in seeing that kind of thing

    • @BeABetterDev
      @BeABetterDev  Před 3 lety

      Hey HeavensMeat! You're suggestion is a great idea for a new video idea, thanks you! I'll work on incorporating this into my todo list. Cheers!

  • @r-rtz
    @r-rtz Před 9 měsíci

    A more interesting concept though is how you generate these unique id's that are used in the sharding / partitioning and ensure uniqueness

  • @DuyTran-ss4lu
    @DuyTran-ss4lu Před rokem

    Awesome

  •  Před 10 měsíci

    @BeABetterDev What if I were to opt for synchronous replication for my read replicas? Wouldn't that provide me with a high level of consistency (strong consistency) between the master node and the replica nodes? Besides, AWS RDS provides async replication for read replicas, does that mean it is eventual consistent? If so, if I am building an application that needs to opt in strong consistency, shouldn't I use AWS RDS read replicas then? What would be an alternative option to that?

  • @loaizar95
    @loaizar95 Před rokem

    amazing video!! Understood almost everything and am not a it guy.. the only thing I did not get is the difference between partition mapping and routing :(

  • @dhriajbhandari
    @dhriajbhandari Před 2 lety

    Great video. Thank you. I just have a question about routing for the determining the shards. Is it always necessary? I was thinking that you could just do modulus on the id to get the shard number instead (eg: customer_id: 12, num_of_shards = 4 so the shard would be 12 % 4 = 0). That way you don't have a single point of failure on the router. What are the downsides to this approach vs router end-point ?

    • @BeABetterDev
      @BeABetterDev  Před 2 lety +2

      Hi there this is a great point thanks for sharing. The problem with using modulus is that it can get difficult to change the assignment of data to shard if you need to re-shuffle your data. With a single table acting as the authority, this can be done trivially.

  • @poketopa1234
    @poketopa1234 Před měsícem

    What I always miss in these videos is, doesn’t introducing a routing layer just kick the can down the road? Now you have all traffic going to a singular routing node, which is not scalable and can fail. What happens when you need to scale the routing node?

  • @cyclomiha
    @cyclomiha Před 3 měsíci

    Hmm..how about PITR? For analytics you could have replica with multi-master approach to each shard, right?

  • @benhunt2023
    @benhunt2023 Před 2 lety

    This feels like the khan academy of coding. Well done.

  • @yna8588
    @yna8588 Před rokem

    Can we scale up and scale down the storage of database as per daily requirement using sharding?