What is CONSISTENT HASHING and Where is it used?

Описание к видео What is CONSISTENT HASHING and Where is it used?

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:    • What is LOAD BALANCING? ⚖️  

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/...
http://www.tomkleinpeter.com/2008/03/...
http://michaelnielsen.org/blog/consis...
   • Consistent Hashing - Georgia Tech - N...  

System Design:
http://highscalability.com/
   • What is System Design?  

Code:
https://github.com/coding-parrot/Syst...

#consistent-hashing #system-design #load-balancing

Комментарии

Информация по комментариям в разработке