<blockquote>
  <p>Or is the connection persisted for the life time of the application?</p>
</blockquote>

<p>Persistent. Subsequent messages will be transmitted across the same connection.</p>

<blockquote>
  <p>If it is persisted, what prevents a well known public node from being swarmed with peer requests?</p>
</blockquote>

<p>The Core implementation has a Connection Manager that increments the ban score for a peer if the peer behaves erroneously (e.g. spamming peer requests). Once a ban score of 100 has been accrued, the peer will be disconnected and banned from connecting until ban time window has been served.</p>

CC BY-SA 4.0
2018-06-22T01:32:55.270Z
2018-06-22T01:32:55.270Z
rny
<p>Lets assume we have 2 bitcoin nodes, A and B. A is already up, and B is now coming up. B lists A as a peer node and attempts to establish a connection. A accepts, a handshake is completed and they confirm they are in sync. Is the connection then terminated until there is a need to communicate with each-other again (ie a new transaction is broadcast)? Or is the connection persisted for the life time of the application?</p>

<p>If it is persisted, what prevents a well known public node from being swarmed with peer requests?</p>

<network><peers><connection>
Is a peer connection maintained for the life of the node, or is it recreated on every request?
David says Reinstate Monica
# Is a peer connection maintained for the life of the node, or is it recreated on every request?

(Asked by: username_0 on 2018-06-21)

Lets assume we have 2 bitcoin nodes, A and B. A is already up, and B is now coming up. B lists A as a peer node and attempts to establish a connection. A accepts, a handshake is completed and they confirm they are in sync. Is the connection then terminated until there is a need to communicate with each-other again (ie a new transaction is broadcast)? Or is the connection persisted for the life time of the application?

If it is persisted, what prevents a well known public node from being swarmed with peer requests?

**Tags:** network, peers, connection


---

## 1 answers

### Answer by username_1 on 2018-06-22. Score: 2 | Accepted answer

> Or is the connection persisted for the life time of the application?

Persistent. Subsequent messages will be transmitted across the same connection.

> If it is persisted, what prevents a well known public node from being swarmed with peer requests?

The Core implementation has a Connection Manager that increments the ban score for a peer if the peer behaves erroneously (e.g. spamming peer requests). Once a ban score of 100 has been accrued, the peer will be disconnected and banned from connecting until ban time window has been served.


---

