Uber | Rate Limiter

Difficulty: MEDIUMCategory: InterviewExperienceFrequency: 1Asked On 2018-02-21Added By Anonymous
Source: Link

Company: Uber
Role: unknown
Interview Stage: unknown
Location: unknown
Year: unknown

Original Post Content:

Whenever you expose a web service / api endpoint, you need to implement a rate limiter to prevent abuse of the service (DOS attacks).

Implement a RateLimiter Class with an isAllow method. Every request comes in with a unique clientID, deny a request if that client has made more than 100 requests in the past second.

Comments