educative.io

Having a separate (somewhat smaller) rate limiter for each API shard as well

If our APIs are partitioned, a practical consideration could be to have a separate (somewhat smaller) rate limiter for each API shard as well. Let’s take the example of our URL Shortener where we want to limit each user not to create more than 100 short URLs per hour. Assuming we are using Hash-Based Partitioning for our createURL() API, we can rate limit each partition to allow a user to create not more than three short URLs per minute in addition to 100 short URLs per hour.

isn’t the minute level rate limited already handled by the counter in the sliding window with counter? why do we need to have a separate rater limiter for each api shard?