Request cancellation is not forwarded to a backend through Azure Front Door

Maksym Kharchenko2 41 Reputation points
2023-03-22T13:10:45.6233333+00:00

We have a problem with a request canceling for Azure App Service behind a Front Door instance. We have long-running AJAX requests from a frontend to a backend part. After initiating request cancellation with AbortController in JS, our backend part, ASP.NET Web API 2, handles the exception and stops further request processing.

It works fine with an app on a local machine or Azure App Service. However, while using a proxy (such as Postman or Fiddler), request cancellation is not forwarded to the backend. Our Azure Front Door Standard instance has similar behavior.

After a deeper investigation, we have found that sometimes request cancellation is handled correctly. It seems to depend on which Front Door POP takes requests.

According to Front Door access logs, the following POPs do not handle our request cancellation: MNZ, MAA, FRA, and BUD. At the same time, with the same configuration, DUS POP take them as expected.

Please suggest if we can do anything to forward the request cancellation on all Front Door POPs. Or is the issue connected to the Front Door's internal mechanisms?

Azure Front Door
Azure Front Door
An Azure service that provides a cloud content delivery network with threat protection.
575 questions
Azure App Service
Azure App Service
Azure App Service is a service used to create and deploy scalable, mission-critical web apps.
6,830 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Maksym Kharchenko2 41 Reputation points
    2023-07-18T16:33:02.25+00:00

    Resolution based on communication with Azure support:

    This is the basic behavior of this service, which works as a proxy. some points work fine, it may depend on their configuration or distance to the server. To guarantee this mechanism, we need to change its logic, and send a special request to cancel the previous one or keep the connection and exchange information about other requests.

    0 comments No comments