Azure Application Gateway support for server-sent events (SSE)

Gabriel Klug 26 Reputation points
2023-10-30T20:57:29.37+00:00

Hi, according to this [post](https://learn.microsoft.com/en-us/answers/questions/1257674/does-azure-front-door-support-sse-(server-sent-eve?source=docs) Azure Front Door doesn't support SSE.

What about Application Gateway? Can we use it for SSE?

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

Accepted answer
  1. ChaitanyaNaykodi-MSFT 26,366 Reputation points Microsoft Employee
    2023-11-02T00:10:15.31+00:00

    @Gabriel Klug

    Thank you for your patience here. I got a response back from the team.

    Currently Azure Application Gateway does not support server-sent events (SSE) but the support will be added in future, currently we do not have an ETA.

    Although we have some validations you may try, please let me know if you are interested in trying the changes out and providing feedback if it meets your requirements.

    Hope this helps! Please let me know if you have any additional questions. Thank you!


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


3 additional answers

Sort by: Most helpful
  1. Martin Hentschel 5 Reputation points
    2023-12-07T17:01:03.4033333+00:00

    You can use SSE with the application gateway. You have to ensure that the responses arriving at the AppGateway have the header "X-Accel-Buffering: no". Buffering does not make any sense for stream like SSE. If buffering is enabled the AppGateway is waiting for the last packet before forwarding to the client. Which it most likely will not receive in time. The header will ensure that the AppGAteway will not buffer the stream.

    I found the approach here:

    https://stackoverflow.com/questions/76161274/delay-in-getting-sse-events-when-configured-via-azure-application-gateway

    We use a specific ingress for our SSE Service in the backend. Using annotations snippets and more_set_headers we ensure that all response coming from the service have the header added.

    Might be also useful.

    https://kubernetes.github.io/ingress-nginx/examples/customization/custom-headers/ Last example

    1 person found this answer helpful.
    0 comments No comments

  2. Markus OBERACKER (PTV Group) 0 Reputation points
    2023-11-30T14:24:16.84+00:00

    Hello @ChaitanyaNaykodi-MSFT

    we have a similar issue regarding the Azure Application Gateways SSE support ... at the moment we are using the Azure Application Gateway v1 wich supports SSE at the moment but v1 will be retired on 28 April 2026 so do you have more information when the SSE support will be integrated in v2 or is there already a Azure Gateway beta version available with SSE support which can be tested?


  3. Martin Hentschel 5 Reputation points
    2023-12-05T09:18:07.8433333+00:00

    Hi, can you provide more details why this is not working? We would like to understand it better to find solutions. SSE is nothing special. And Application Gateway v2 is nginx which is totally capable of handling it.

    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.