skip to Main Content

So, I was following this tutorial and successfully published the web API to both Azure App Service and Azure API Management. Then (going beyond tutorial) I added a rate-limit policy to the API in API Management service.

I tested it successfully on API management Test tab. However, if I access the App Service route URL (https://***.azurewebsites.net/) it will not throttle.
What am I missing here?
How do I make the policy active for the App Service URL?

enter image description here

2

Answers


  1. Requests to https://***.azurewebsites.net/ belong to Azure App Service.

    If you want to do requests to API Management, the default hostname is azure-api.net:
    https://***.azure-api.net/

    If you want to use throttling from API Management, you have to the API Management URL like you did in the test tab:

    enter image description here

    Login or Signup to reply.
  2. Markus Meyer did a good job explaining how it’s supposed to be used.
    I think that you might benefit from this diagram showing the differences between calling your service through APIM or directly.
    enter image description here

    "What am I missing here?"
    I think you’re missing that API Management is a service, totally separate from you App Service. You do not "extend" the features of the App Service with APIM, you instead put APIM infront of your App Service and call your API through APIM to gain the benefits (of rate limiting in this example).

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search