Application gateway backend end pool not getting updated

Kalaimathy Murugesan 1 Reputation point
2022-09-14T06:13:31.187+00:00

Hi Team,

I have an application gateway with a backend pool that contains multiple VMSS.

Whenever I redeploy any of the VMSS', I have to restart the application gateway each time to reflect my changes .

If I don't restart the application gateway, I get 502 error when I try to access the URL specific to that VMSS which was redeployed.

I'd like to know how do I reflect my changes in the application gateway without having to restart it every time there is a change in any of the VMSS'.

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,051 questions
{count} votes

1 answer

Sort by: Most helpful
  1. GitaraniSharma-MSFT 49,481 Reputation points Microsoft Employee
    2022-09-22T14:47:26.813+00:00

    Hello @Kalaimathy Murugesan ,

    I understand that you have an application gateway with a backend pool that contains multiple VMSS and whenever you redeploy any VMSS, the application gateway needs to be restarted to reflect the changes or else it reports 502 error.

    You also confirmed that during the redeployment of VMSS, an A record is created and there are updates to the DNS entries of the backend pool.

    As mentioned in this doc, this is a by design behavior.

    Issue: If there are updates to the DNS entries of the backend pool, then the backend health status cannot be retrieved by the Application gateway.

    Cause: Application Gateway resolves the DNS entries for the backend pool at time of startup and doesn't update them dynamically while running.

    Resolution: Application Gateway must be restarted after any modification to the backend server DNS entries to begin to use the new IP addresses. This operation can be completed via Azure PowerShell or Azure CLI.

    Azure PowerShell
    Get Azure Application Gateway
    $appgw=Get-AzApplicationGateway -Name <appgw_name> -ResourceGroupName <rg_name>
    Stop the Azure Application Gateway
    Stop-AzApplicationGateway -ApplicationGateway $appgw
    Start the Azure Application Gateway
    Start-AzApplicationGateway -ApplicationGateway $appgw

    Azure CLI
    Stop the Azure Application Gateway
    az network application-gateway stop -n <appgw_name> -g <rg_name>
    Start the Azure Application Gateway
    az network application-gateway start -n <appgw_name> -g <rg_name>

    Kindly let us know if the above helps or you need further assistance on this issue.

    ----------------------------------------------------------------------------------------------------------------

    Please "Accept the answer" if the information helped you. This will help us and others in the community as well.

    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.