Course Hive
Search

Welcome

Sign in or create your account

Continue with Google
or
What is CONSISTENT HASHING and Where is it used?
Play lesson

System Design Playlist - What is CONSISTENT HASHING and Where is it used?

5.0 (1)
14 learners

What you'll learn

This course includes

  • 6.5 hours of video
  • Certificate of completion
  • Access on mobile and TV

Summary

Keywords

Full Transcript

Load Balancing is a key concept to system design. One of the popular ways to balance load in a system is to use the concept of consistent hashing. Consistent Hashing allows requests to be mapped into hash buckets while allowing the system to add and remove nodes flexibly so as to maintain a good load factor on each machine. The standard way to hash objects is to map them to a search space, and then transfer the load to the mapped computer. A system using this policy is likely to suffer when new nodes are added or removed from it. Consistent Hashing maps servers to the key space and assigns requests(mapped to relevant buckets, called load) to the next clockwise server. Servers can then store relevant request data in them while allowing the system flexibility and scalability. Some terms you would here in system design interviews are Fault Tolerance, in which case a machine crashes. And Scalability, in which case machines need to be added to process more requests. These two principles are allowed by Consistent Hashing, and hence it is an important building block to a system design architect's toolbox. Another term used often is request allocation. This means assigning a request to a server. Consistent hashing assigns requests to the servers in a way that the load is balanced are remains close to equal. Server architecture is a subjective concept, and there are outliers for many cases. Don't think of Consistent Hashing as a silver bullet for fault tolerance and scalability, but a useful concept for request allocation. Use it to solve software questions in interviews and real life. Best of luck! Prerequisite: https://youtu.be/K0Ta65OqQkY Recommended system design video course: https://interviewready.io 00:00 Request Hashing 03:00 Request Mapping 06:02 Problems 07:01 Virtual Servers 09:40 Applications 10:18 Thank you! Along with video lectures, this course has architecture diagrams, capacity planning, API contracts and evaluation tests. It's a complete package. References: https://www.hackerearth.com/practice/data-structures/hash-tables/basics-of-hash-tables/tutorial/ http://www.tomkleinpeter.com/2008/03/17/programmers-toolbox-part-3-consistent-hashing/ http://michaelnielsen.org/blog/consistent-hashing https://www.youtube.com/watch?v=viaNG1zyx1g System Design: http://highscalability.com/ https://youtu.be/OFdlimhkyGc Code: https://github.com/coding-parrot/SystemDesignCourse/blob/master/service-orchestrator/src/main/java/algorithms/ConsistentHashing.java #consistent-hashing #system-design #load-balancing

Course Hive

Continue this lesson in the app

Install CourseHive on Android or iOS to keep learning while you move.

Related Courses

FAQs

Course Hive
Download CourseHive
Keep learning anywhere