A Brief Introduction to Consistent Hashing

แชร์
ฝัง
  • เผยแพร่เมื่อ 23 ก.ย. 2024
  • Consistent hashing: what is it and how does it work?

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

  • @DavidBadilloMusic
    @DavidBadilloMusic 4 ปีที่แล้ว +75

    Finally! A video with that gives a clear background of why hashing is even used in the first place in load balancing! Other videos just mind-numbingly just start like "you have a circle of servers and requests and you hash this and that..." (what!?). Thank you for the awesome explanation!

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

      I just pictured the amazon data centre engineers moving the servers in a circle and being very proud they got it perfect.

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

      I realize I am kind of off topic but does anyone know a good site to stream newly released series online?

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

      @Aldo Melvin Lately I have been using FlixZone. You can find it by googling :)

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

      I totally agree, Thank you Hannah for explaining the complex concept in a very easy way

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

    Short and sweet. After couple of hours of sifting through all that junk out there, found the best one.

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

    best explanation I've found of this. Most people just draw a circle but you're explanation was concise and very well explained. Thanks a ton!

  • @topoisonfungus
    @topoisonfungus 5 ปีที่แล้ว +6

    It's shockingly surprising why so less views and so less feed for this awesome video for this concept introduction 101.
    Excellent video Hannah, purely for the simplicity of words and excellent explanation approach.
    Looking forward to many more!
    Thanks!

  • @detaalpha123
    @detaalpha123 4 ปีที่แล้ว +1

    Super easy to understand! Clean and simply explained! Thank you!!
    Reminded me of Einstein's quote, "if you can't explain it simply, you don't understand it well enough".

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

    The best of all CH videos hands down!

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

    this is the best video on 'Consistent Hashing' . Thanks a lot for making this.

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

    take a bow!!!!! what an easy explanation, nicely presented. I had been googling but couldn't find straight forward way to understand. THANKS A LOT. Cheers.

  • @khane_k_shauqeen8488
    @khane_k_shauqeen8488 5 ปีที่แล้ว +10

    thanks for authentically short and precise info.

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

    Thank you so much for this explanation! I've been all over youtube and couldn't understand one thing. You saved me!

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

    Amazing explanation, truly appreciate it!

  • @guitargirlproduction
    @guitargirlproduction 4 ปีที่แล้ว +5

    this was so great, thanks!! A little sad you don't have more videos like this, cheers!

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

    Nice clear presentation. Thank you. Brief and to the point is very welcome in an educational video.

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

    This is the best video on Consistent Hashing.
    Can you post videos on other topics as well ?

  • @ryan-bo2xi
    @ryan-bo2xi 4 ปีที่แล้ว

    Many teachers out there miss out this basic way of building fundamentals into complex system. Basics first ! Great job

  • @vrishtimongia7420
    @vrishtimongia7420 4 ปีที่แล้ว +1

    This was so helpful and clear compared to other resources I've seen. Thank you!

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

    Well done.. You focussee strongly on the problem statement

  • @9806541501
    @9806541501 5 ปีที่แล้ว +1

    Really an awesome video on consistent hashing.Great work.Love from India

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

    Consistent Hashing is a fairy tale told by Akamai to get a patent. The ring that everyone draws is really an ordered map, invented around 1960.

  • @AmanKumar-my6sl
    @AmanKumar-my6sl 2 ปีที่แล้ว

    Amazing Explanation!!!

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

    Excellent Explanation 👏

  • @natalyam8899
    @natalyam8899 4 ปีที่แล้ว +1

    Thank you for simple explanation of this concept. Please continue to make system design explanation videos! You are very good at it!

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

    Thank you! Amazing video.

  • @khalila.8502
    @khalila.8502 3 ปีที่แล้ว

    Finally a good video on consistent hashing, thanks a lot!

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

    Great explanation! Thanks!

  • @43johri
    @43johri 2 ปีที่แล้ว

    Hey Hannah,
    Why didn't you put more videos ?..Your explanation is super crisp and soothing to ears. Very unlikely these days. Thanks for the awesome video though.

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

    best video so far, crisp & clear, thanks @Hannah

  • @gmronit
    @gmronit 4 ปีที่แล้ว

    clear and crisp information. Good work!!

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

    sweet and concise.

  • @matthewchunk3689
    @matthewchunk3689 4 ปีที่แล้ว

    brief & clear explanation of an important subject. thanks!

  • @Ankt-nq8tw
    @Ankt-nq8tw 4 ปีที่แล้ว +6

    Thanks for explaination but got confused at end. Need explaination with example

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

      its like you having more postal addresses. so more the number of postal address, lesser is the chance that you will get a missed courier. of course you will not be present in all the postal addresses. someone else might take it on your behalf and route to ur actual physical location. so the postal addresses are "virtual" instances of yours, mapped to a "physical" instance of yours.
      so more addresses you have (aka, computational power of a server), more chances of you collecting deliveries (aka, requests from a user). this way you can adopt a skewed and staggered load-balancing strategy based on the computational powers of your servers.

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

    Very clear explanation. Thanks!

  • @csonoda1
    @csonoda1 5 ปีที่แล้ว +1

    Great video, thank you! You should do more videos, your explanation was very clear.

  • @xD-saleem
    @xD-saleem 2 ปีที่แล้ว +1

    Thank you!

  • @RyanBurns31892
    @RyanBurns31892 4 ปีที่แล้ว

    Fantastic. You explain this so well!

  • @SamuelKarani
    @SamuelKarani 4 ปีที่แล้ว

    best explanation on consistent hashing out there

  • @maximkhoruzhiy9407
    @maximkhoruzhiy9407 4 ปีที่แล้ว

    Great presentation! And a special thank you for clear English. Think about making more presentations.

  • @rohitjaiswal4121
    @rohitjaiswal4121 4 ปีที่แล้ว

    Very nice and to the point explanation. Thanks!

  • @jit3191
    @jit3191 5 ปีที่แล้ว

    Great and precise video, please post more discussion like these

  • @deepakmarneni2110
    @deepakmarneni2110 4 ปีที่แล้ว

    Nice Explanation. clear and crisp.

  • @nicololucchesi9028
    @nicololucchesi9028 5 ปีที่แล้ว

    Nice video, clean and concise explanation, many thanks!

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

    simple and elegant :)

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

    Very clear explanation. Thank you

  • @michellebecerra2147
    @michellebecerra2147 5 ปีที่แล้ว +4

    Thanks for the video! Could you please make more? :)

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

    great explanation! could you make more videos?

  • @blackcatcaptain2022
    @blackcatcaptain2022 5 ปีที่แล้ว

    clear and concise and short.

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

    Great video

  • @mimihui2405
    @mimihui2405 4 ปีที่แล้ว

    Really well explained, please make more videos!

  • @HXYZZZ
    @HXYZZZ 5 ปีที่แล้ว

    Thank you. Explained very well and easy to follow. great video

  • @ThePrasanthKp
    @ThePrasanthKp 4 ปีที่แล้ว

    Nicely put. Thanks Hannah.

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

    Thank you for the video. I heard that adding more virtual nodes distributes the load evenly. I am not sure how? Could you please clarify that?

  • @lijiechen2119
    @lijiechen2119 5 ปีที่แล้ว

    Thanks for explanation of consistent hashing. Good video!

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

    you did an amazing job at teaching, but this seems to be the only one video uploaded in your channel. please keep going.

  • @pallavisingh2912
    @pallavisingh2912 5 ปีที่แล้ว

    Super clean explanation. Thank You. I would encourage you to make some more videos like ths :)

  • @jpwengertv
    @jpwengertv 4 ปีที่แล้ว +1

    Awesome and simple explanation!
    Hannah, given K hash functions and a request id, how to decide which function to apply on the request id? Do you just take one of the K function randomly?

    • @Danelius90
      @Danelius90 4 ปีที่แล้ว +3

      My understanding is you're hashing the server id here, in order that you get multiple copies of it across the hash ring (we're still in the same id space). This is different to the request hashing function, requests will just get mapped as usual. However instead one segment for each server in the first case, we have loads of segments that should more evenly distribute to all the servers

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

      Also, in practice, instead of using K hash functions, K server id variants are used with a single hash function (e.g., by appending some prefix or suffix to the server id). It seems to be easier to maintain consistency and a good uniform distribution that way.

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

    Did not understand the part after 6:11. What are these three hash functions within a server?

  • @FelipeRodrigues-lj1el
    @FelipeRodrigues-lj1el 5 ปีที่แล้ว

    Excellent video! Congratulation!

  • @lmxqlmxq
    @lmxqlmxq 5 ปีที่แล้ว

    very well explained and good Virtual Node introduction

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

    How do we distribute the server nodes throughout the ring?

  • @hishu567
    @hishu567 5 ปีที่แล้ว

    Great stuff... Please create more such videos (y)

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

    Sweet, thanks for this!

  • @zgngor
    @zgngor 4 ปีที่แล้ว

    Amazing! Thank you Hannah.

  • @kyahatu
    @kyahatu 5 ปีที่แล้ว +1

    You have introduced me to a new concept called Virtual Nodes. Feels like enlightened. Thanks much.

  • @keshavrastogi5005
    @keshavrastogi5005 5 ปีที่แล้ว

    Great video... Just that I was expecting some practical example with hashing on circular ring part. Apart from that awesome. Keep it up and thanks a lot! :)

  • @fxnoob
    @fxnoob 5 ปีที่แล้ว

    thanks for sharing the knowledge. Lots of Love.

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

    you didn't explain why consistent hash using server id as input instead of request id

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

    You've made a grand total of only ONE video??? Why.....

  • @vinaykumar15
    @vinaykumar15 5 ปีที่แล้ว +1

    Can you explain if load balancer uses round robin algorithm to evenly route the incoming request why do we even need consistent hashing?

    • @berndeckenfels
      @berndeckenfels 5 ปีที่แล้ว +1

      vinaykumar15 the example makes sure all request for a session go to the same sever (you would not hash the request Id but the session Id or source ip+port). But typically consistent hashing is not used on client load balancing applications.

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

      The purpose of consistent hashing in this case is to ensure that cache misses are minimized when a machine goes down or when a new one comes up. Load balancing is a somewhat orthogonal issue, but there are some algorithms to get the best of both worlds (because vanilla consistent hashing may suffer from overload, as you suspect). Vimeo ran into this problem and implemented one such algorithm in HAProxy (sending its PR to the maintainers), and it is now available for everyone to use.

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

      Here’s the video where they explain it: th-cam.com/video/jk6oiBJxcaA/w-d-xo.html

  • @Rohit-nn9ky
    @Rohit-nn9ky 5 ปีที่แล้ว +1

    The servers S0, S1, S2 etc. are now hashed with different hashing algorithms H1, H2, H3 to increase randomness. Are the requests R0, R1, R2 etc also hashed with H1, H2, H3 ? or just with a single hashing algorithm ?

    • @AnunayAmar
      @AnunayAmar 4 ปีที่แล้ว

      You will hash the request with only a single hashing function, you don't want to duplicate the request. The idea is to distribute the requests evenly among multiple servers, that is why we use multiple hash functions. Also note, virtual nodes are not real nodes if you have 3 different hash functions then you will get 3 virtual nodes for every actual node.

  • @shuyangzhu4095
    @shuyangzhu4095 4 ปีที่แล้ว

    Thank you for the introduction. If, for eg., the second server was down, the data got saved into next server on the ring. What will happen when the second server gets back on? Will it go through all the data in the third server and move whatever belongs to second server back?

    • @prabhatranjan3876
      @prabhatranjan3876 4 ปีที่แล้ว

      Actually In normal hashing, when second server goes down, We need to rehash immediately in order to redirect the request on first and third server. otherwise all the request which mod value referring to second server, will get lost..
      So, when 2nd server back, we need to rehash again and redirect the request to the second server.
      For Consistent Hashing, data will not back from third server to second server unless we migrate it manually(through some procedure). Also it depends, If you are using it for caching, generally cache data may expire after sometime, so in that case, migration might be costly operation, but if consistent hashing applied on database level, then we need to migrate the data from third server to second server.

  • @王昕铎
    @王昕铎 5 ปีที่แล้ว +1

    greate video! thank u veeery much

  • @ashishjain871
    @ashishjain871 5 ปีที่แล้ว

    Thanks for the video; appreciate it.

  • @NimeshKumar031
    @NimeshKumar031 5 ปีที่แล้ว

    Very helpful ! Keep it up.

  • @Dyslexic_Neuron
    @Dyslexic_Neuron 5 ปีที่แล้ว

    such nice small and informative vdo :D .... Plz continue the good work :)

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

    Started out really promising but totally vague towards the end. No takeaway indeed.

  • @romannagel2414
    @romannagel2414 5 ปีที่แล้ว

    Really educative!

  • @MirekKrenc
    @MirekKrenc 4 ปีที่แล้ว

    Thanks !

  • @iyalovecky
    @iyalovecky 4 ปีที่แล้ว

    Треба більше подібних відео.

  • @AmitKumar-zk9pq
    @AmitKumar-zk9pq 4 ปีที่แล้ว

    After watching this video, I am wondering why I didn't understand from other sources. Its a shame that there's just 1 video

  • @vtvvnha2230
    @vtvvnha2230 5 ปีที่แล้ว

    greate video

  • @ngshinc
    @ngshinc 4 ปีที่แล้ว

    nice!

  • @viskumdee
    @viskumdee 5 ปีที่แล้ว

    virtual node explanation is not clear

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

    Finally samjh nhi aya

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

    Everything was good till virtual nodes.

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

    you waste me 5 minutes in watching your useless explaination

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

    Thank you!

  • @thyagtubes
    @thyagtubes 5 ปีที่แล้ว

    Great video