Apprunner timeout for SSE connection

0

Does Apprunner support SSE connection? If yes for how long? I read in the article that there is a limit of 120 seconds.

asked 17 days ago28 views
1 Answer
0

AWS App Runner does support HTTP requests, including Server-Sent Events (SSE) connections. However, there is an important timeout limit to be aware of for all HTTP requests, including SSE connections.

App Runner imposes a total request timeout limit of 120 seconds on HTTP requests. This 120-second limit includes the time it takes for the application to read the request (including the body) and complete writing the HTTP response.

For SSE connections, which are typically long-lived, this 120-second timeout could be a significant limitation. It means that any SSE connection would be forcibly closed after 120 seconds, regardless of whether data is still being sent or received.

It's important to note that this timeout limit is an App Runner-specific constraint. However, the actual timeout you experience might be shorter depending on the application server you're using. For example, if you're using Gunicorn (a common Python HTTP server), it has a default timeout of 30 seconds, which would take precedence over App Runner's 120-second limit.

Given these constraints, if you need to maintain longer-lived SSE connections, you might need to consider alternative architectures or services that better support long-running connections.
Sources
Developing application code for App Runner - AWS App Runner

profile picture
answered 17 days ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions