Too many open files on the client #87

Closed
opened 2025-11-20 05:06:07 -05:00 by saavagebueno · 0 comments
Owner

Originally created by @braginini on GitHub (Dec 3, 2021).

When running the client app with many peers in the network (100+) we observe too many open sockets on a single machine.
This is caused mostly by the ICE trickle process that creates a separate listener for each candidate type and local interface.

Our own Wireguard proxy creates an additional socket as well.

We observed that roughly 4 sockets per-peer are created making it a resource waste.
We could use a UDPMux from pion to reduce the number of connections, however, it only works for the host candidates.

We need to come up with some solution to that. The best option so far is to extend the Pion ICE gathering mechanism.

Originally created by @braginini on GitHub (Dec 3, 2021). When running the client app with many peers in the network (100+) we observe too many open sockets on a single machine. This is caused mostly by the ICE trickle process that creates a separate listener for each candidate type and local interface. Our own Wireguard proxy creates an additional socket as well. We observed that roughly 4 sockets per-peer are created making it a resource waste. We could use a [UDPMux](https://github.com/pion/ice/blob/master/udp_mux.go) from pion to reduce the number of connections, however, it only works for the host candidates. We need to come up with some solution to that. The best option so far is to extend the Pion ICE gathering mechanism.
saavagebueno added the bugenhancementneeds-review labels 2025-11-20 05:06:07 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: SVI/netbird#87