-
Notifications
You must be signed in to change notification settings - Fork 939
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
Removing libp2-deflate
from workspace
#4522
Comments
thomaseizinger
added
the
decision-pending
Marks issues where a decision is pending before we can move forward.
label
Sep 20, 2023
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
mxinden
removed
the
decision-pending
Marks issues where a decision is pending before we can move forward.
label
Sep 21, 2023
This comment was marked as outdated.
This comment was marked as outdated.
thomaseizinger
changed the title
Remove
Removing Sep 22, 2023
libp2-deflate
from workspacelibp2-deflate
from workspace
4 tasks
4 tasks
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
We are removing
libp2p-deflate
from the workspace. Deflate is a compression algorithm and those rely on patterns in data to minimize bandwidth by trading it against CPU power.In libp2p, we strongly recommend always using an encryption and authentication layer with your transports. A good encryption algorithm (like noise or TLS) transforms cleartext into data that is indistinguishable from random noise, in other words, does not have any patterns. Compression this is therefore a waste of CPU power.
One could apply the compression before encrypting the data, i.e. before negotiating a muxer or on a per-stream level.
In all cases, negotiating
/deflate
comes at the cost of an additional round-trip for connection setup. When used on a per-stream level, it even adds an additional round-trip to every stream. We encourage protocol authors to use short-lived streams in which case reducing round-trips is really important and probably outweighs the effects of encrypting the data.For these combined reasons, we believe that the
/deflate
protocol does not have enough usage to justify maintaining it within the repository. If you still have a usecase for it, we recommend you fork it and maintain it out of tree.This came up as part of #2863 and the easiest solution is to remove it.
The text was updated successfully, but these errors were encountered: