Database Sharding and Partitioning

Поделиться
HTML-код
  • Опубликовано: 1 фев 2025

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

  • @shishirchaurasiya7374
    @shishirchaurasiya7374 Год назад +22

    I was literally consfused in gaining the clarity untill you came to the point where you transposed this theory into understanding through tables and the reference with SQL queries, thanks a lot to your efforts for this loving beautiful explaination Arpit sir

  • @AlokMehta24
    @AlokMehta24 Год назад +9

    Excellent video Arpit . Coming from no software and system engineering background , this was the best video to explain data sharding and partioning . I am a Tech PM for AWS Supply Chain and data partitioning and sharding is real deal for us. Thank for making this extremely easy to understand video

  • @nikhilrajput8696
    @nikhilrajput8696 10 месяцев назад +1

    Wow...really nice. Nowadays a lot of people are selling and talking about system design and always try to build some optimistic solution straight forward without going into the internals and in fact they have not even worked on a lot of systems. I strongly feel the way of your explanation is very very nice and I am going to buy your system design plan to improve mine.

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

      Thanks. Looking forward to having you enrolled 🙌

  • @codecspy3479
    @codecspy3479 Год назад +6

    2 Important points which i felt could be discussed more are 1) When you said the choice of partitioning depends on the load , usecase and access patterns , can you please give an example of each case ?? 2) When you were talking about the advantages and disadvantages of sharding , have you written these points considering only sharding and no partitioning or have you written considering both sharding and partitioning ??

  • @ranjithpals
    @ranjithpals 2 года назад +2

    Thanks!

  • @kahleryasla
    @kahleryasla 6 месяцев назад +4

    I am just stunned how you describe every concept that easily and even if the concept is so complicated. I love you and your works man please continue doing it. I promise I will join as a member to this channel as soon as I become an earning developer. :D

  • @SatishYadav-yi3ne
    @SatishYadav-yi3ne 20 дней назад

    Just started the Arpit videos, And Now I loved the most all over the youtube videos
    Thanks Arpit for making this kind of videos

  • @jaskiratwalia
    @jaskiratwalia 11 месяцев назад +2

    Wonderfully explained! Cleared all my doubts. Please keep making such videos. These are also well timed, not too short nor too long.

  • @udit.kansal
    @udit.kansal 2 дня назад

    Amazing video to break down the concept for anyone! Loved it!

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

    This is excellent, high-quality content! I always had questions about sharding and partitioning, but now I understand: sharding pertains to the database server level, while partitioning is about organizing the data itself.

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

    You have a brilliant way to explain, only one who has gone through the journey would be able to teach it this way.

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

    I have just started learning System Design and not from a backend background. Still able to understand the concepts. Thanks for creating such content.

  • @chaitanyawaikar382
    @chaitanyawaikar382 2 года назад +4

    One of the best videos explaining the nuances between partitioning and sharding. Thank you @ArpitBhayani

  • @ranjithpals
    @ranjithpals 2 года назад +5

    Thanks a lot ! That was well explained with clear and concise explanation. Looking forward to enrolling in your complete system design course.

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

    I looove this kind of explanation. i.e stepping back and discussing the scenarios behind why something came up to be. Thanks a lot for these videos man!

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

    Amazing explanation! The diagrams were really helpful in helping me solidify my understanding of the difference between sharding and partitioning.

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

    Very good explanation with right examples. Hats off to you. Thanks for great content. I always thought shard and partitions are same but you clarified it very well.

  • @dataman17
    @dataman17 20 дней назад

    what an explanation!!! Kudos to you! Keep enlgightning us with the knowledge.

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

    One video and all the clutter on Sharding and Partitioning is clear. Thank you so much Arpit.

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

    This is such a great and simple explanation of partitioning and sharding of a database. Would love to watch the video on partitioning strategies when it is uploaded.

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

    When i finished watching this video , concepts looked super easy. Thanks

  • @AqibJavaid-zl7vc
    @AqibJavaid-zl7vc 10 месяцев назад

    Excellent video ❤. Finally, I got a good grasp of the whole concept.

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

    One of the best explanations on the internet, well done sir

  • @nimitkanani1691
    @nimitkanani1691 2 года назад

    Very beautifully and simply explained. The content of the video flowed so smoothly. Thank You @ArpitBhayani

  • @___vandanagupta___
    @___vandanagupta___ 2 года назад +1

    The knowledge of amount in this video is tremendous!!! Extremely helpful 👍👍👍 thankyou sir!!

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

    Bro your diagram example made my day. Such a clear and concise explanation of this topic. Bro dil se love u ❤❤ for making this video.

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

      All Software Performance Enthusiats 😊,Please do also watch our Playlist on Software Performance concepts !

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

    Great clarity and in depth explanation. Thank you

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

    Best explanation so far. thanks brother

  • @maxvolkov6127
    @maxvolkov6127 8 дней назад

    Very approachable - thank you!

  • @abhilashmukherjee9536
    @abhilashmukherjee9536 Месяц назад

    Great explanation bro. Full clarity.

  • @prashantchaudhary8147
    @prashantchaudhary8147 10 дней назад

    Excellent explanation.

  • @vikasbhutra9400
    @vikasbhutra9400 2 года назад +1

    Thanks a lot Arpit for explaining in so simplistic way. One request can you please make video on Sharding strategies and also on how composite indexes stores in the disk.

    • @AsliEngineering
      @AsliEngineering  2 года назад

      Soon.

    • @hc90919
      @hc90919 2 года назад

      @asli engineering - Bhai, any update on the sharding strategies.
      Also, one more request is examples of scenarios to explain shard key selection.
      How is the data replicated behind the scenes n stuff please ?

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

    Nice explaination, arpit.

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

    Awesome content Arpit ! Thanks a lot and please do continue post more on concepts such as well as analysis of real use cases.

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

    This is really great video. Subscribed, and exploring other videos uploaded by you.

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

    Amazing Explanation!

  • @DevendraSingh-y5f
    @DevendraSingh-y5f 5 месяцев назад

    Partitioning can be done at table as well. So let's consider we have a table named X and it is having huge data so if we want to increase the performance and improve the latency we can partition the table into Y shards.

  • @kritibindra4232
    @kritibindra4232 2 года назад +1

    Wow this was really really helpful! Thank you posting this.✨

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

    Bhai bhot videos dekhe.. this one was lit 🔥

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

    Mind Blowing ❤

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

    liked the way concepts are explained like a story.

  • @mohitkumartoshniwal
    @mohitkumartoshniwal 2 года назад +1

    A very clear and detailed explanation. ♥️

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

    thank you. I always assumed that they are the same thing. This cleared things up for me.

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

    Thanks for these practical examples and overall explanation

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

    thanks a lot arpit sir really enjoyed and got full clarity

  • @iMakeYoutubeConfused
    @iMakeYoutubeConfused 11 месяцев назад

    Very clear explanation, thanks!

  • @toufeeqkhan9735
    @toufeeqkhan9735 14 дней назад

    Excellent ❤

  • @neerajdixit7102
    @neerajdixit7102 2 года назад

    Awesome Arpit, Thanks truly admire your way of teaching

  • @letsexplorewithanika2642
    @letsexplorewithanika2642 2 года назад +1

    Very clear explaination

  • @DEEPAKKUMAR-wk5pk
    @DEEPAKKUMAR-wk5pk 2 года назад +1

    Wow great explanation

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

    Great video ! Nicely explained. :)
    But I have one query , towards the end of the video :
    The example you shared for "Sharding NO and partitioning YES" about Airline Check-in System and Ticket Booking System. How is that classified as partitioning if the databases are altogether different ?
    Any thoughts ?

  • @ShivangGoyal-n2n
    @ShivangGoyal-n2n Год назад

    literally one of the based video i have ever seen on this topic.

  • @pramodpatil-ue8sm
    @pramodpatil-ue8sm Год назад

    Great explanation, as always. Please post a link If you have recorded any video on Partitioning strategies

  • @shreyanshsinha37
    @shreyanshsinha37 2 года назад +1

    When we say Shard1 or Shard2, do we mean the sql server hosted on the EC2 instance combinedly as a shard?

  • @ryan-bo2xi
    @ryan-bo2xi Год назад

    bohot badhia bhai .. lajawwab

  • @vijaymunavalli335
    @vijaymunavalli335 2 года назад +1

    Its very practical explanation...cool one

  • @shintojoseph9166
    @shintojoseph9166 2 года назад +1

    Clear explanation

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

    Thanks so much Arpit!!

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

    finally I understand what sharding is, thanks a ton

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

    Such a clean explanation🙌

  • @KriszSch
    @KriszSch 11 месяцев назад

    Great explanation!

  • @timamet
    @timamet 2 года назад +1

    amazing explanations, thank you

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

    GOD of explanation !

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

    thanks a lot arpit for an awesome explanation as always

  • @VenkateshwaranP-u8b
    @VenkateshwaranP-u8b 4 месяца назад

    Thanks for the explanation

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

    this is an amazing video and your explainations are very clear

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

    Very Nice Video, I just loved the explanation.

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

    Simple and to the point explanation .. Thanks Arpit, Liked & Subscribed :)

  • @zeyuli53
    @zeyuli53 2 года назад +1

    well explained, thank you

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

    Great video as always! 👍 I’ve got a question: 🤨 I have these words 🤨. (behave today finger ski upon boy assault summer exhaust beauty stereo over). What should I do with this? 🤷‍♂️

  • @techkunbyamogh
    @techkunbyamogh 11 месяцев назад

    thank you so much , clearly understood!!

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

    Kudos to you❤

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

    @arpit Thanks for such dense information in so short and simple video.
    However I have a query on a corner case
    - How can have replicas when one has multiple shards with partitioning?
    - In this case is replication locally on the shard or it can also be replicated on other shards for high availability across avalability zone or DR (like kafka architecture)?

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

    Greatly explained

  • @dhaanaanjaay
    @dhaanaanjaay 2 года назад

    One question, at 21.00 the matrix shows what it looks like when we have both sharding and partioning, how that is different from having two databases on two different EC2 instance for two applications?

  • @mahendratonape27
    @mahendratonape27 7 месяцев назад

    Thanks a lot u clearing confusion of long period

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

    super video Arpit

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

    very helpful, thanks

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

    Dude this was amazing

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

    Thanks, really detailed

  • @iHariPatel
    @iHariPatel Год назад +4

    As my view Partition is more complex because you have to work with partition key! With wrong query accidentally query scan all partition’s.

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

    Hello arpit, at 5:49, why you mentioned that the new resources are being allocated to the EC2 machine? I think that should be allocated to the DB server running on EC2 machine right?

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

      I meant the server running the database. The database is eventually running on some VM.

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

      @@AsliEngineering thanks arpit

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

    As usual amazing

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

    Great explainer. - thanks!

  • @Sharmasurajlive
    @Sharmasurajlive 2 года назад

    Simple and efficient explanation 👍🏻

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

    Great content, as always! I need some advice: My OKX wallet holds some USDT, and I have the seed phrase. (alarm fetch churn bridge exercise tape speak race clerk couch crater letter). How can I transfer them to Binance?

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

    Hey great video Ankit! I was wondering how sorting and specially filtering would work across shards?
    Or is that an anti pattern ( just like cross shard joins )

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

    @arpit what's the benefit of partitioning the data but not sharding it. Can you give me a usecase please?

    • @AsliEngineering
      @AsliEngineering  Год назад +4

      Partitioning allows your database to read/access/move the required subset of data easily and efficiently.
      1. Imagine if you partition data by time and create one partition for every hour and someone queries how many events happened in the last 10 hours, you would just need to access last 10 partition to fulfil this query. Others are not even required to be read.
      2. In a distributed setup, instead of moving individual rows/elements we can easily and efficiently move partitions across the cluster for balancing the load.

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

      Understood! Thanks 🙏

  • @sumeetsingh1729
    @sumeetsingh1729 11 месяцев назад

    how's it decided which shard is hit by request? Is there any router in front ensuring routing of requests?

  • @KrishnaSagar02
    @KrishnaSagar02 7 месяцев назад

    I have a doubt sir. I think increase in overall storage capacity and higher availability, doesn't got hand in hand.
    If we shard and partition data, then the capacity will be available but then the data is not same in both shards i.e., if one shard becomes offline then the other shard cannot provide data if the requested data is in the offline shard. So no higher availability.
    And if we only do sharding then the same data will be in both servers, and as u said if we assume 100tb, then the other will also have 100tb only? We cant get 200tb.
    This is what I thought. Correct me if im wrong.

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

      I too got the same doubt, I came to know that in this case, our system will be available but the data might be inconsistent, so still the server accepts requests and provides an empty response.

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

    Start from 2:50

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

    This is amazing !

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

    When running two databases on the same machine, are we not still sharing the same underlying resources such as CPU, memory, and disk I/O?

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

      How can u run two sql daemon on the same machine?

  • @tawseefbhat977
    @tawseefbhat977 2 года назад

    how do we know which partition or shard our data is located when we make query? any detailed explantion

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

    Amazing !!

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

    Do we use sharding when we have better options available like Oracle RAC where database can be scaled horizontally

  • @tommyshelby6277
    @tommyshelby6277 Месяц назад

    informative without any bullshit, thanks!!

  • @sachinjindal4921
    @sachinjindal4921 2 года назад +1

    Awesome, can you give some practical examples.

    • @AsliEngineering
      @AsliEngineering  2 года назад +1

      These are practical as they can get keeping it generic and not touching upon SRE side of things :) Every database comes it its own partitioning and sharding strategy and we need to go through their documentation to apply it.
      I talked about using a database proxy to bifurcate the request in one of the earlier videos, in case you are looking for that.
      Would recommend you picking a database and seeing how you can actually create shards and manage them. ElasticSearch can be a great start.

  • @sachinr0000
    @sachinr0000 2 года назад

    Hi Arpit... You have nice videos. I like interviewes with people involved in growing high scale systems.
    However in this video, concept explained is wrong. Partition & Shards are same (term is used interchangeably). What you are referring as Shard is Nodes (or host container). You may want to correct the same. Hope this helps.

    • @AsliEngineering
      @AsliEngineering  2 года назад

      I agree the terms are used interchangeably; but overall what i explained is correct also I cleared the same in the video as well.

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

    Nicely expalined. :)