Michel Foucault
Michel Foucault

Reputation: 1732

Azure CDN and Azure API Management integration

I've found here the following architecture:

enter image description here

I've understood that single-page web application requests static resourses to CDN and API resources to APIM. Is the browser contacting two different FQDN (for example: www.site.it and www.api.site.it)?

In order to access to with a single FQDN, could I move the CDN in front of the APIM? Could I achieve it with CDN rules?

Could I help me?

enter image description here

Upvotes: 3

Views: 2989

Answers (2)

michidk
michidk

Reputation: 350

This can be achieved by creating a second origin & origin group (create the first one for the origin you already have) for the API with a custom type to point to the URL of the API. Then add a URL rewrite rule with an "Origin Group Override" action to the rules engine and choose your API origin (you might also want to enable the "Cache expiration" action to bypass cache).

Upvotes: 0

PramodValavala
PramodValavala

Reputation: 6647

This should be possible with routing rules which are available in the Verizon Premium Tier of Azure CDN.

The rules that you would need to configure would be a URL Rewrite for requests with a /api path and the Bypass Cache rule for any endpoints that may return sensitive/user-specific data.

Also, note that you optimum performance of the APIs that return dynamic content, you would want to deploy APIM to multiple regions as well (and the APIs behind it as well, functions in this case).

Azure Front Door is another option that you could consider which has a host of other features available to you.

Upvotes: 3

Related Questions