question

ToyinOnagoruwa-5278 avatar image
0 Votes"
ToyinOnagoruwa-5278 asked MayankBargali-MSFT edited

NEED MORE INSIGHT ON HOW TO CONFIGURE APIM FOR ADVANCED USE

I want to ask a couple of questions. Hope you don't mind?

  1. Let's say one of our users made a failed request (i.e 4** code), Is there a functionality on Azure APIM where I can be able to get & log the email/username of that individual that made the request? I know there is a unique Id to each request but it doesn't do any good since I can't use it to map the particular user in question.

  2. Let's say I have more than 1 AKS clusters that the Azure API management points to, Is there a way I can manually allocate the percentage (%) of requests (i.e 70% of traffic goes to cluster A while the remaining 30% of traffic goes to cluster B) to these clusters within the Azure API management tool?

Thanks in advance.

azure-api-management
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

1 Answer

MayankBargali-MSFT avatar image
0 Votes"
MayankBargali-MSFT answered

@ToyinOnagoruwa-5278 Thanks for reaching out. Please find my line answer below

Let's say one of our users made a failed request (i.e 4 code), Is there a functionality on Azure APIM where I can be able to get & log the email/username of that individual that made the request? I know there is a unique Id to each request but it doesn't do any good since I can't use it to map the particular user in question.
There is no out of box feature that can help your requirement. In case if you are using OAUTH then you can get the email id/name information from OAUTH token. You can leverage log events to event hub policy to log those details based on the response from your backend service. In case if you cannot find/using OAUTH then that information cannot be log as the end user will be using subscription key to validate the APIM request.

Let's say I have more than 1 AKS clusters that the Azure API management points to, Is there a way I can manually allocate the percentage (%) of requests (i.e 70% of traffic goes to cluster A while the remaining 30% of traffic goes to cluster B) to these clusters within the Azure API management tool?
APIM can only have one backend URL for single API so unfortunately you cannot have more than one endpoint as backend. But you can leverage the Azure traffic manager based on weighted routing that can route the traffic to different AKS endpoint based on your routing configured. Now you can use the ATM endpoint as the backend endpoint in your APIM API's

5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.