Atlassian Interview Question

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