netbirdio / netbird

Connect your devices into a secure WireGuard®-based overlay network with SSO, MFA and granular access controls.
https://netbird.io
BSD 3-Clause "New" or "Revised" License
10.57k stars 473 forks source link

POST /signalexchange.SignalExchange/Send API frequently #1344

Open xiaolei0125 opened 9 months ago

xiaolei0125 commented 9 months ago

Describe the problem I use nginx proxy netbird signal, and got /signalexchange.SignalExchange/Send API call frequently when netbird android client disconnected

It seems that other netbird clients are still trying to exchange information with netbird client on android through signal server.

Expected behavior If the management service knows which clients are offline, can make other clients stop to call/signalexchange.SignalExchange/Send API for the offline android client?

NetBird status -d output: Daemon version: 0.24.3 CLI version: 0.24.3 Management: Connected to https://nb.xxx.com:8443 Signal: Connected to https://nb.xxx.com:8443 FQDN: m1.nb.iot NetBird IP: 100.64.0.3/16 Interface type: Kernel Peers count: 3/4 Connected

bcmmbaga commented 9 months ago

Hello @xiaolei0125, this is the current behavior of the client. We have plans to optimize this in the next quarter and prevent constant attempts to connect, even if the peer is offline.

xiaolei0125 commented 6 months ago

Any update?

dkrhodes commented 4 months ago

+1 we still got this prob with version v0.27.4

xiaolei0125 commented 4 months ago

@bcmmbaga I have created netbirds on many devices, but most of them are offline most of the time. I have received a large number of requests for these offline devices, and I think this is unreasonable.

dkrhodes commented 4 months ago

@bcmmbaga I have created netbirds on many devices, but most of them are offline most of the time. I have received a large number of requests for these offline devices, and I think this is unreasonable.

That's true, we have 150 servers, when only a few of them got offline, the caddy and signal service used almost 100% CPU usage of a 4C8G server.

thorleifjacobsen commented 3 months ago

Any update on this? We have 2500 servers planned to install. This sounds scary?

xiaolei0125 commented 2 months ago

still got this prob with version v0.28.2

xiaolei0125 commented 2 months ago

@bcmmbaga @mlsmaycon @lixmal
Do you have a plan when to solve this problem? I think when the number of devices is large, this problem becomes very obvious.

mlsmaycon commented 2 months ago

The signal reconnection shouldn't be an issue for connectivity as it happens automatically and it only does that, it shouldn't interrupt any existing peer connection.

We are looking at optimizing network map updates as now it is just brute force as it sends to all peers all the time there is an update even if there is no update for the peer.