API Gateway, or APIM for routing to multiple backends?

Charles-Antoine Saint-Laurent 21 Reputation points
2021-05-13T16:34:43.507+00:00

Hello,

Here is my scenario: I'd like to implement APIM, but I have multiple backends (https://001.host.ca/Api, https://002.host.ca/Api, etc.) for each client. Ideally, I'd want only 1 APIM instance (example: https://apim.azure-api.net/XXX/api/) where XXX would be changed by the client so it would route him to the correct backend. The goal of having only 1 APIM instance is to be able to set the same policies for all clients.

My questions
1- Where should this routing logic be configured (APIM inbouding processing? API Gateway?)
2-Is this the correct way to set this up? Is this most convenient way?

Thank you

Azure API Management
Azure API Management
An Azure service that provides a hybrid, multi-cloud management platform for APIs.
1,751 questions
Azure Application Gateway
Azure Application Gateway
An Azure service that provides a platform-managed, scalable, and highly available application delivery controller as a service.
957 questions
0 comments No comments
{count} votes

Accepted answer
  1. Pramod Valavala 20,516 Reputation points Microsoft Employee
    2021-05-18T12:05:46.43+00:00

    @Charles-Antoine Saint-Laurent You can use the set-backend-service policy to forward the request to the appropriate backend based on the incoming request.

    You would have to add a parameterized operation and fetch the parameter from the MatchedParametersproperty of the context.Request object.

    To answer your exact questions

    1. Since you need APIM policies, requests will have to go through APIM. With the above policies, you can cut out one extra hop required.
    2. This is convenient for sure with less moving parts and based on your requirement (to what you've shared) this seems like a reasonable way to set it up
    1 person found this answer helpful.

0 additional answers

Sort by: Most helpful