Closed paolodina closed 3 years ago
I'd also consider to use something in front of hypercorn if this could help. But have no idea what to do.
Maybe put Nginx in front?
@jkarneges I thought it could have be managed by django-eventstream, but yes, I'll try to put caddy as a reverse proxy enabling gzip server side, good idea.
Yeah for now a proxy may be easiest.
For gzip to be done in the actual Django app, I think it would be best done as middleware. This should be possible by writing ASGI middleware code. The Starlette framework appears to have a gzip middleware, although I don't know how portable it is.
Long term I hope all normal Django middlware will work with ASGI, but that could be awhile.
Hello, the application where I'm using django-eventstream sends every few seconds a good amount of text data using
send_event
. I wonder if it'd be possible to send compressed messages to the clients instead of full responses (~100kb).I need to reduce the outgoing bandwidth, thanks for any advice you could give.