Atlassian interview question

How would you design a system to handle rate limiting for an API?