In the previous chapter, we learned that we can use Azure Functions HTTP triggers as the backend web API. If you want to restrict the number of requests by your client applications to, let's say, 10 requests per second, then you might have to develop a lot of logic. Thanks to Azure API Management, you don't need to write any custom logic if you integrate Azure Functions with API Management.
In this recipe, we will learn how to restrict clients to API access only once per minute for a given IP address. The following are the high-level steps that we will follow:
- We will create an Azure API Management service
- Then, we will integrate Azure Functions with API Management
- Then, we will configure request throttling using inbound policies
- Finally, we will test the rate limit inbound policy configuration