I'm trying to implement Rate Limiting using Redis. I need to call an API that has TPS 100 or that can be called 100 times in every second. I've a limitation that I cannot call API for testing. How can I test that my API is called not more than 100 times in a second ?
Redis::throttle('key')->allow(100)->every(1)->then(function () {
// API called that has rate limit
}, function () {
// Could not obtain lock...
return $this->release(10);
});