You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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:
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: