Delay in getting SSE Events when configured via Azure Application gateway
We have implemented SSE Server in python. We are using EventSource to subscribe to the SSE server from angular project.
When the SSE Server is running in the local system, when an Event is pushed to the server, the event is getting pushed to the EventSource without much delay.
Problem: When the SSE Server is deployed to VM and configured via Azure Application gateway, when an Event is pushed to the server, there is a delay before the event is getting pushed to the EventSource. Sometimes, the delay is as high as 15 seconds.
When the same SSE Server in VM is configured for direct access via ipaddress, any Event that is pushed to the server is getting pushed to the EventSource without much delay.
Is the delay in Events getting pushed to Event Source when access is configured via Azure Application gateway is happening because of the Azure app gateway? Any settings in the Azure Application gateway that needs to be configured specifically for SSE?
Python version: 3.8
SSE version: sse_starlette v1.3.4
Application gateway Tier used: Standard
Thank you.