@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.