System Design · Salesforce · Medium
Implement a quota enforcement module for a high-cost API endpoint. Each customer is identified by a unique alphanumeric ID and has a configurable monthly budget of allowed calls. The system must support two operations: changing a customer's limit and checking whether an incoming call is permitted. Design the QuotaLimiter class with the following interface: The quota window is a calendar month in the UTC timezone. For example, all timestamp values that fall in January 1970…
Checking your access…