Rate limiting is a critical technique in System Design that controls the frequency of requests sent to the Server. It is essential for:
Preventing System Overload
Mitigating malicious attacks, such as DDoS
and mostly these can be accomplished using Static rate limiting.
But I was recently working with a client where we need to do Rate limiting dynamically based on the user’s purchased plan and Admin settings for that client.
Here is the simplified, working version of the Sliding Window protocol implemented using Redis — Github Link