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

Support for WebSocket Extensions #659

Open
johanandren opened this issue Dec 15, 2016 · 13 comments
Open

Support for WebSocket Extensions #659

johanandren opened this issue Dec 15, 2016 · 13 comments
Labels
1 - triaged Tickets that are safe to pick up for contributing in terms of likeliness of being accepted help wanted Identifies issues that the core team will likely not have time to work on nice-to-have (low-prio) Tasks which make sense, however are not very high priority, feel free to help out! t:core Issues related to the akka-http-core module t:websocket

Comments

@johanandren
Copy link
Member

Continuation of akka/akka#18709
We currently do not support websocket extensions (i.e. registering "an extension" in the server, or requesting one in the client).

Currently we see no strong need to provide this functionality.
If you have a strong use case for it, please comment here

@johanandren johanandren added 1 - triaged Tickets that are safe to pick up for contributing in terms of likeliness of being accepted help wanted Identifies issues that the core team will likely not have time to work on nice-to-have (low-prio) Tasks which make sense, however are not very high priority, feel free to help out! labels Dec 15, 2016
@johanandren
Copy link
Member Author

One example use case: web socket compression, current draft: https://tools.ietf.org/html/draft-ietf-hybi-permessage-compression-28

Nice overview here: https://www.igvita.com/2013/11/27/configuring-and-optimizing-websocket-compression/

Implementing this either requires a way to register such an extension or to implement it internally in Akka HTTP. I think that even if we would implement permessage ourselves it would be nice if it was done through an extension API rather than directly in the blueprints etc.

@johanandren
Copy link
Member Author

Note that the original ticket was closed because of lack of interest in it.

@jrudolph
Copy link
Member

jrudolph commented Dec 15, 2016

Final version of the standard seems to be RFC 7692

One reason it is not completely trivial to implement is that JDK Deflate doesn't support setting window sizes to limit the amount of memory a receiver needs to keep between decompressing chunks.

@dleclere
Copy link

@jrudolph org.jcraft.jzlib supports setting the window size.

@malibuworkcrew
Copy link

+1 for compression

@acjay
Copy link
Contributor

acjay commented Mar 14, 2018

Compression would be very good for my team's use cases too.

@acjay
Copy link
Contributor

acjay commented Apr 6, 2018

It's been difficult to track exactly what the state of the art is in Web Sockets compression support, but it seems like most of the major browsers send headers related to compression:
Sec-WebSocket-Extensions: permessage-deflate for Firefox and Chrome
Sec-WebSocket-Extensions: x-webkit-deflate-frame for Safari

It seems like it should be possible for Akka HTTP to take this into account and enable compression when requested.

@ktoso
Copy link
Member

ktoso commented Apr 9, 2018

The issue so far remains a low priority for us; if you'd like to give implementing this a shot, that would be very welcome though @acjay :-) Thanks in advance!

@mikx
Copy link

mikx commented Mar 25, 2020

+1

@mrubinwch
Copy link

+1

@jrudolph jrudolph added t:core Issues related to the akka-http-core module t:websocket labels Feb 17, 2021
leedgdev added a commit to leedgdev/sttp that referenced this issue Feb 23, 2021
leedgdev added a commit to leedgdev/sttp that referenced this issue Feb 23, 2021
@gw-gdm
Copy link

gw-gdm commented Aug 22, 2021

+1, Is there any update on the server side compression?

@prongs
Copy link

prongs commented Dec 6, 2021

Compression is a use case for my team as well. We have a kind of request response pattern over the websocket and sometimes our responses are large around 1 to 4 MB.

Now we put up a manual compression over it and we observed that the data size becomes 7% of what it was and the time between such a request and its response becomes 35% of what it was.

Now, the problem with such a custom method is that debugging the websocket messages becomes a huge pain. I don't want to decompress every message for debugging some problem. For that reason we're not taking this to prod.

I believe compression itself is a strong enough reason to support it natively.

@FredGithub
Copy link

Websocket compression would be needed for my team as well!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
1 - triaged Tickets that are safe to pick up for contributing in terms of likeliness of being accepted help wanted Identifies issues that the core team will likely not have time to work on nice-to-have (low-prio) Tasks which make sense, however are not very high priority, feel free to help out! t:core Issues related to the akka-http-core module t:websocket
Projects
None yet
Development

No branches or pull requests