Design an in-memory rate limiter that restricts the number of allowed requests per client within a specified time window.
A rate limiter is a system component or algorithm used to control the rate of operations performed by a user, client, or service over a given period. It helps prevent abuse, reduce load, and ensure fair usage of system resources.