Enable gzip compression in azure application gateway

Shreyas Arani 271 Reputation points
2021-12-13T09:15:31.497+00:00

Hi can anyone help to enable gzip compression in azure app gateway. I couldn't find any settings in portal. Is there any other way?

please help @SRIJIT-BOSE-MSFT

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,213 questions
Azure Kubernetes Service
Azure Kubernetes Service
An Azure service that provides serverless Kubernetes, an integrated continuous integration and continuous delivery experience, and enterprise-grade security and governance.
2,447 questions
{count} votes

1 answer

Sort by: Most helpful
  1. SRIJIT-BOSE-MSFT 4,346 Reputation points Microsoft Employee
    2021-12-13T14:11:30.09+00:00

    @Shreyas Arani , thank you for sharing the details.

    As mentioned here:

    The AppGW itself does not do compression at the gateway. However, if the backend is doing compression then it is proxied back to the user correctly.

    Now the application gateway ingress controller only provides an ingress controller (as opposed to let's say nginx ingress controller where the ingress controller pod contains both ingress controller container and NGINX/NGINX Plus container).

    Thus without the ability of the Application Gateway to perform compression itself, the Azure Application Gateway Ingress Controller cannot be configured to accomplish compression through the application gateway.

    Instead, you can have a standalone Azure Application Gateway connected to a backend (which can be a Kubernetes ingress controller like nginx or traefik) which has the ability to perform compression. Else if you use application gateway ingress controller, then the backend service has to handle the compression.

    For example please check this section which describes traefik ingress controller with gzip compression and specifies that only traffic from the Azure Application Gateway subnet is allowed..

    ----
    Hope this helps.

    Please "Accept as Answer" if it helped, so that it can help others in the community looking for help on similar topics.


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.