Is there a way to know which backend is serving the traffic?

Baliga, Ramprasad (Cognizant) 0 Reputation points
2025-02-06T19:26:36.07+00:00

We have 3 backend linux servers where nodejs application is installed. Azure application gateway is configured to route the requests to these 3 backend nodes. However, we would like to setup a custom header in Application Gateway to understand at any point in time which backend is currently serving the traffic? Is there a way to achieve this in Application Gateway?

Azure Application Gateway
Azure Application Gateway
An Azure service that provides a platform-managed, scalable, and highly available application delivery controller as a service.
1,131 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Rohith Vinnakota 2,750 Reputation points Microsoft Vendor
    2025-02-07T05:59:12.4233333+00:00

    Hi @Baliga, Ramprasad (Cognizant),

    Welcome to Microsoft Q&A Platform. Thank you for reaching out & hope you are doing well.

    I understand you want to know the which backend is serving the traffic.

    To view this, you need to enable the diagnostic settings and allow the access log to be stored in the log analytics workspace.

    Refer this link how to enable diagnostic settings in the application gateway:
    Diagnostic logs - Azure Application Gateway | Microsoft Learn

    see in log

    User's image

    In that log we can see the Backend serving the traffic.


    If above is unclear and/or you are unsure about something add a comment below.

    Please don’t forget to close the thread by clicking "Accept the answer" wherever the information provided helps you, as this can be beneficial to other community members.

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.