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

Removing libp2-deflate from workspace #4522

Closed
Tracked by #4521
thomaseizinger opened this issue Sep 20, 2023 · 3 comments · Fixed by #4540
Closed
Tracked by #4521

Removing libp2-deflate from workspace #4522

thomaseizinger opened this issue Sep 20, 2023 · 3 comments · Fixed by #4540
Assignees

Comments

@thomaseizinger
Copy link
Contributor

thomaseizinger commented Sep 20, 2023

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.

@thomaseizinger thomaseizinger added the decision-pending Marks issues where a decision is pending before we can move forward. label Sep 20, 2023
@thomaseizinger

This comment was marked as outdated.

@mxinden

This comment was marked as outdated.

@mxinden mxinden removed the decision-pending Marks issues where a decision is pending before we can move forward. label Sep 21, 2023
@thomaseizinger

This comment was marked as outdated.

@thomaseizinger thomaseizinger changed the title Remove libp2-deflate from workspace Removing libp2-deflate from workspace Sep 22, 2023
@thomaseizinger thomaseizinger self-assigned this Sep 23, 2023
@mergify mergify bot closed this as completed in #4540 Sep 27, 2023
mergify bot pushed a commit that referenced this issue Sep 27, 2023
mergify bot pushed a commit that referenced this issue Oct 26, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants