Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

App Engine response buffering causes SSEs to be buffered #1005

Closed
richard-to opened this issue Oct 3, 2024 · 2 comments · Fixed by #1012
Closed

App Engine response buffering causes SSEs to be buffered #1005

richard-to opened this issue Oct 3, 2024 · 2 comments · Fixed by #1012
Assignees
Labels
bug Something isn't working

Comments

@richard-to
Copy link
Collaborator

Not technically a bug.

See https://cloud.google.com/appengine/docs/flexible/how-requests-are-handled?tab=python#x-accel-buffering

Apparently this can be disabled if using X-Accel-Buffering=no in the response.

Not really sure yet how to handle this since this is App Engine specific, so not sure we want to set this every time.

We could have a flag / config / env var that disables it (could be too specific)

Alternatively add a way for people to adjust the header response (this could be too broad)

@richard-to richard-to added the bug Something isn't working label Oct 3, 2024
@richard-to
Copy link
Collaborator Author

Maybe a temporary workaround is to use nginx in front of Mesop. Then I believe you can use nginx to modify the response header. I think the main thing is making a Docker image that has both nginx and Mesop installed.

@wwwillchen
Copy link
Collaborator

Interesting, good find!

I did a bit of Googling and it looks like this setting isn't App-engine specific and it's from nginx

I'm inclined to just setting X-Accel-Buffering=no in all the (SSE) UI responses.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants