How would you implement rate limiting and throttling for your API?