How can I reduce the ping latency in libp2p? #5627
Replies: 2 comments
-
Hi, and thanks for your interest! Can you disclose how you are measuring the libp2p pings? The connection establishment for |
Beta Was this translation helpful? Give feedback.
-
I am also using libp2p to build some real-time remote applications. When I first connected, the delay was about 100ms, but after some data transmission optimization, the delay is now about 5ms. Of course, if it is just a simple ping, the delay will increase if it is used to transmit data. If I connect directly without libp2p, my two nodes are about 1ms, which means that libp2p itself actually consumes about 4ms. I think it can be optimized. I am also learning. |
Beta Was this translation helpful? Give feedback.
-
I created a demo using libp2p_stream and TCP to read ICMP packets from a TUN interface, send them to a peer, and receive replies.
In this demo, the ping latency with libp2p is 800ms, whereas a direct ping is only 120ms.
How can I optimize the ping latency? Is libp2p suitable for use as part of a Layer 3 VPN?
Beta Was this translation helpful? Give feedback.
All reactions