Common problems with hash tables

"Starting from 0 to make LeetCode" hash table common problems

1. Know hash functions and hash tables

2. Design RandomPool structure

Insert picture description here
Double hash

3. Know the Bloom filter

10 billion url, blacklist Big Data

Adjust the number of hash functions and the number of open arrays to determine the error rate

Bit type map
Insert picture description here
Insert picture description here

4. Recognize consistent hashing

Server design
Anti-stress, load balancing

Classical anti-stress
Insert picture description here
problem: When adding and subtracting machines, data needs to be re-migrated

Solution: Consistent hashing
reduces the cost of data migration and also achieves load balancing

Hash field
Insert picture description here

Virtual node technology

Note: I didn't understand too much
Insert picture description here

Guess you like

Origin blog.csdn.net/bosszhao20190517/article/details/107825953