[Ethereum] What’s limiting the peer count

devp2ppeers

I see on ethstats that some node are connected to 100, or even 500+ peers.
I figured I'd try to increase my peer counts, e.g., in the hope of getting blocks and transactions broadcasted more widely faster.

I use geth –maxpeers=70 , but then, when I go to the geth console (e.g., geth attach), it seems I'm only connected to 35 peers. Where does the limitation come from? How does the node stop accepting peers?

Should I manually call admin.addPeer to add another bunch of peers?

Best Answer

Being connected to 35 peers is usually more than enough. What are you trying to achieve that makes you want to be connected to more nodes?

I assume you are using a computer at home which usually is connected via a router to the internet, maybe even behind a firewall that limits possible connections further. This might limit the number of nodes that you are connected to. As outlined in the wiki, geth connects to some bootnodes which then tell your geth some other nodes that they know on startup. In order to allow incoming connections to your geth node pro-actively, geth supports UPnP but most routers have it disabled. Alternatively you could activate port forwarding to your geth machine on the router for TCP port 30303 and UDP port 30301 as described in this answer. If you are behind a very strict firewall that limits both TCP and UDP, you might have to setup a VPN or port forwarding tunnel to allow for more connections.

Related Topic