Perform rate limiting logic for provided customer ID
Anonymous User
752

Given the following empty method, perform rate limiting logic for provided customerId. Return true if the request is allowed and false if it is not.

public bool rateLimit(int customerId)
{
	// each customer can make x requests every y seconds
}

What would be the best way to approach this problem?

Comments (3)