This week’s system design refresher:
-
High 5 Makes use of of Redis (Youtube video)
-
Frequent load-balancing algorithms
-
Varieties of VPNs
-
Potential experiment platform structure
Most individuals suppose Redis is only for caching.
However Redis can achieve this rather more than that. It’s good for:
-
Session retailer
-
Distributed lock
-
Counter
-
Charge limiter
-
Rating/leaderboard
-
and so forth.
On this video, we get insights into how Redis solves attention-grabbing scalability challenges and be taught why it’s a useful gizmo to know nicely in our system design toolset.
The diagram beneath exhibits 6 frequent algorithms.
-
Static Algorithms
-
Spherical robin
The consumer requests are despatched to totally different service cases in sequential order. The companies are often required to be stateless. -
Sticky round-robin
That is an enchancment of the round-robin algorithm. If Alice’s first request goes to service A, the next requests go to service A as nicely. -
Weighted round-robin
The admin can specify the load for every service. Those with the next weight deal with extra requests than others. -
Hash
This algorithm applies a hash perform on the incoming requests’ IP or URL. The requests are routed to related cases primarily based on the hash perform outcome.
-
-
Dynamic Algorithms
-
Least connections
A brand new request is shipped to the service occasion with the least concurrent connections. -
Least response time
A brand new request is shipped to the service occasion with the quickest response time.
-
👉 Over to you:
-
Which algorithm is hottest?
-
We are able to use different attributes for hashing algorithms. For instance, HTTP header, request kind, consumer kind, and so forth. What attributes have you ever used?
Suppose you…