Skip to content

Commit

Permalink
docs: add mplex deprecation text (#345)
Browse files Browse the repository at this point in the history
  • Loading branch information
p-shahi authored Aug 25, 2023
1 parent af6348b commit cc85f6a
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion content/concepts/multiplex/mplex.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,14 @@ data streams, including stream-oriented data and other types of messages.

### Drawbacks

mplex is currently in the process of being deprecated (to track progress please see [this issue](https://github.com/libp2p/specs/issues/553)).
mplex does not have any flow control.
> Backpressure is a mechanism to prevent one peer from overwhelming a slow time consuming the data.
mplex also doesn't limit how many streams a peer can open.

{{< alert icon="" context="">}}
**Yamux should be used over mplex in libp2p**. As it natively supports flow control, it is better suited for applications that require the transfer of large amounts of data.
**If you need a dedicated muxer, Yamux should be used (overall, QUIC should be preferred over TCP).**. Yamux natively supports flow control, it is better suited for applications that require the transfer of large amounts of data.

Until recently, the reason mplex was still supported was compatibility with js-libp2p,
which didn't have yamux support.
Expand Down

0 comments on commit cc85f6a

Please sign in to comment.