Skip to content
Cosmopediaby Unity Nodes
DiscussionsCosmos-SDKHow can get more connected peers?Forum ↗

How can get more connected peers?

Cosmos-SDK3 posts1,539 views1 likesLast activity May 2019
PI
pingOP
Jul 2018 1

I get a very small number from 0 to 15 on n_peers when i visit host:26657/net_info

{
“jsonrpc”: “2.0”,
“id”: “”,
“result”: {
“listening”: true,
“listeners”: [
“Listener(@47.254.216.102:26656)”
],
“n_peers”: “6”,
“peers”: [
XXXXXXXX
]
}
}

the value of n_peers is changed very often. so I guess the connection is closed soon after established.

I tried many cloud server in different country and I had the same problem.

Can anyone tell me how to optimize?

this is my config file:

laddr = “tcp://172.20.113.226:26656”
external_address = “47.254.29.36:26656”

4A
4avka
May 2019

I am quite new to Cosmos SDK stuff, but I previously (and ongoing) have worked on btcsuite/btcd and there is a parameter you can set in the configuration that regulates the target numbers and maximum numbers of peers.

I think it also depends in some part on the peers you connect to - if they have some limit set then you can’t connect to them while their threshold is met.

Also, something else, bear in mind that Tendermint uses epidemic transmission and these kinds of numbers are typical in epidemic protocols, it reduces the message work per node while achieving the same rate of propagation, and defends against partitioning by nodes shuffling their peers periodically and randomly.

PI
ping
May 2019

Thanks @4avka . I did not know how to it ten months ago, but I can do it very well after GOS.

and I think your understanding is right. thanks for sharing with us.

← Back to Discussions