Gokulesh Profile picture
SDE @ZOHO
Apr 2, 2022 5 tweets 1 min read
#systemdesign
What is CAP theorem?
CAP stands for Consistency, Availability, and Partition tolerance. The theorem states that you cannot achieve all the properties at the best level in a single database. But we can only pick two out of three at a time and that totally depends on our prioritize based on requirements.
Mar 31, 2022 5 tweets 2 min read
#systemdesign #ConsistentHashing
Does load balancer use hashing?
Hashing is one of the common methods used in Load Balancing for distributing requests among the web servers. How load balancer uses hashing?
We have something known as request_id that is uniquely and randomly generated. Each request by the client is uniquely identified by this request_id. Load balancer hashes the request_id with the proper hash function and distributes the requests.