Back to problems

Rate Limit by Multiple Request Fields (Per-Field / Multi-Dimensional)

Algorithm · Roblox · Medium

Problem Statement Building on the single-field rate limiter from Part 1, each request now carries multiple fields (for example, userId, deviceId, endpoint). You must rate limit every field independently, enforcing all dimensions at the same time. For each field dimension: A single field value is allowed at most limit requests in any rolling time window of window seconds. Decision rule: a request is ALLOW only when it stays within the limit for every dimension; otherwise it…

Checking your access…