Pregunta de entrevista de OfferUp

How would you implement rate-limiting in code?