Pergunta de entrevista da empresa X

How would you implement a rate limiting system?