Hi Kenny Wong (HK),
Unfortunately, it’s not possible to bypass Azure Application Gateway’s default response buffering behavior by modifying your application endpoint or NGINX Ingress settings. This is because response buffering is a resource-level configuration on the Application Gateway itself, and it controls how responses are handled before being sent to the client. If buffering is enabled, the gateway will wait to receive the complete response from the backend before forwarding it, even if the backend is streaming data in chunks.
To achieve real-time streaming behavior response buffering must be disabled directly on the Application Gateway resource. This change can only be performed by someone with sufficient permissions on the gateway resource.
Your FastAPI endpoint and NGINX Ingress are correctly configured to disable buffering upstream. However, these settings only ensure that NGINX does not buffer the response from FastAPI; they cannot override or bypass the buffering enforced by Application Gateway.
Please refer below documentation: https://free.blessedness.top/en-us/azure/application-gateway/use-server-sent-events
https://free.blessedness.top/en-us/azure/application-gateway/proxy-buffers
If the provided response was resolved your query. Could you please accept the answer and upvote it so it will be helpful to community,