3

If I understood correctly, a connection is outgoing if it was initiated by my node, otherwise it is incoming. Therefore, I was under the impression that with a fully synced blockchain, you should have many incoming connections (because many other nodes are currently downloading from you) and very few outgoing connections (because your node doesn't need to initiate a lot of connections, since its blockchain is up-to-date).

However, I've been running a VPS node 24/7 for several months now (hence it is fully synced), and at the time of writing it has 20 incoming connections and ~800 outgoing connections (I didn't put any limits on the number of connections).

How to explain such a high number of outgoing connections? Why does my node need to initiate all these connections, if its version of the blockchain is up-to-date?

4

Your understanding is correct: outgoing connections are initiated by you, incoming connections are initiated by the peer. You can certainly have a peer syncing from you via an outgoing connection though.

The 800 connections is just a bug in the accounting. They're not all actual connections. You can see that using netstat or similar tool.

When a node is synced, it still needs connections to process new transactions and blocks. The default is to keep 8 outgoing connections, regardless of whether the node is synced.

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.