Implementation of rate limiting strategies: token bucket and leaky bucket