<p>I think your scenario would work if you have a way of broadcasting the ELB address (or preferably CNAME) to known entities across a network. For instance we know from a previous answer "Several host names (such as dnsseed.bluematt.me) are maintained that resolve to a list of IP addresses known to be running nodes." (bitcoin.stackexchange.com/a/3537/44818).</p>

CC BY-SA 3.0
2017-01-30T17:02:15.683Z
2017-01-30T17:02:15.683Z
Alex
<p>I was able to locate the following discussion (and a few others that were marked duplicate of this one) on node discovery in Bitcoin:</p>

<ul>
<li><a href="https://bitcoin.stackexchange.com/q/3536/6975">How do Bitcoin clients find each other?</a></li>
</ul>

<p>I guess, the primary challenge is, the number of nodes is not under any one's control. So, a traditional load balancer wouldn't know in advance the number (and IP address) of the nodes. Thus, it wouldn't know how to balance the load. (Or, maybe it can figure out dynamically, not sure).</p>

<p>But, suppose, I wanted to launch a private version of Bitcoin where I had control over number of nodes that can ever be online. Then, I could set-up one URL on AWS ELB, for all clients to connect, where this URL will have all the nodes 'behind' it. Note that, it doesn't necessarily have to be AWS ELB; it could be the <a href="http://www.haproxy.org/" rel="nofollow noreferrer">HAProxy</a> or others.</p>

<p>Is this feasible?</p>

<p>For a detailed list of types of nodes, see this <a href="http://orm-chimera-prod.s3.amazonaws.com/1234000001802/images/msbt_0603.png" rel="nofollow noreferrer">wonderful graphic</a> from the book, 'Mastering Bitcoin'. </p>

CC BY-SA 3.0
2017-01-29T18:00:44.080Z
I'm a bit confused about your use case. What clients are connecting to the load balancer? What do the clients get when they connect - Bitcoin wire protocol, or JSON-RPC?
Nick ODell
CC BY-SA 3.0
2017-01-29T18:04:19.610Z
The same clients that had to discover a node before connecting. With a load balancer, all clients connect to the same end point and the load balancer will route the request to the right node. The load balancer will not deal with payloads or protocol.
cogitoergosum
CC BY-SA 3.0
2017-01-29T20:26:06.083Z
You're describing a scenario that seems entirely unrelated to bitcoin -- you're talking about centralized control, nothing distributed and decentralized, so there is no need for discovery, seeding, etc... but as long as you are using HTTP, or at least something over a TCP (not UDP) transport then... well, that's what ELB and HAProxy *do*... so... I'm not sure what you're asking.  *"the load balancer will route the request to the right node."*  How does one determine the "right" node if the load balancer does not deal with payloads or protocols?
Michael - sqlbot
CC BY-SA 3.0
2017-01-30T04:50:19.310Z
Consensus will always be distributed - that will not change. My question is about the way a client connects for transmitting a transaction. Currently, a discovery mode is used. My suggestion (when looking at a private blockchain) was to let a load balancer route the transaction to the right node; where, to begin with, the "right" node is arrived after a round robin selection.
cogitoergosum
CC BY-SA 3.0
2017-01-30T10:26:52.870Z
I think your scenario would work if you have a way of broadcasting the ELB address (or preferably CNAME) to known entities across a network. For instance we know from a previous answer "Several host names (such as dnsseed.bluematt.me) are maintained that resolve to a list of IP addresses known to be running nodes." (http://bitcoin.stackexchange.com/a/3537/44818).
Alex
<peer-discovery><amazon-web-services>
AWS ELB for Bitcoin node discovery?
cogitoergosum
# AWS ELB for Bitcoin node discovery?

(Asked by: username_0 on 2017-01-29)

I was able to locate the following discussion (and a few others that were marked duplicate of this one) on node discovery in Bitcoin:

* [How do Bitcoin clients find each other?](https://bitcoin.stackexchange.com/q/3536/6975)

I guess, the primary challenge is, the number of nodes is not under any one's control. So, a traditional load balancer wouldn't know in advance the number (and IP address) of the nodes. Thus, it wouldn't know how to balance the load. (Or, maybe it can figure out dynamically, not sure).

But, suppose, I wanted to launch a private version of Bitcoin where I had control over number of nodes that can ever be online. Then, I could set-up one URL on AWS ELB, for all clients to connect, where this URL will have all the nodes 'behind' it. Note that, it doesn't necessarily have to be AWS ELB; it could be the [HAProxy](http://www.haproxy.org/) or others.

Is this feasible?

For a detailed list of types of nodes, see this [wonderful graphic](http://orm-chimera-prod.s3.amazonaws.com/1234000001802/images/msbt_0603.png) from the book, 'Mastering Bitcoin'.

**Tags:** peer-discovery, amazon-web-services

> **Comments:**
> **username_1**: I'm a bit confused about your use case. What clients are connecting to the load balancer? What do the clients get when they connect - Bitcoin wire protocol, or JSON-RPC?  
> **username_0**: The same clients that had to discover a node before connecting. With a load balancer, all clients connect to the same end point and the load balancer will route the request to the right node. The load balancer will not deal with payloads or protocol.  
> **username_2**: You're describing a scenario that seems entirely unrelated to bitcoin -- you're talking about centralized control, nothing distributed and decentralized, so there is no need for discovery, seeding, etc... but as long as you are using HTTP, or at least something over a TCP (not UDP) transport then... well, that's what ELB and HAProxy *do*... so... I'm not sure what you're asking.  *"the load balancer will route the request to the right node."*  How does one determine the "right" node if the load balancer does not deal with payloads or protocols?  
> **username_0**: Consensus will always be distributed - that will not change. My question is about the way a client connects for transmitting a transaction. Currently, a discovery mode is used. My suggestion (when looking at a private blockchain) was to let a load balancer route the transaction to the right node; where, to begin with, the "right" node is arrived after a round robin selection.  
> **username_3**: I think your scenario would work if you have a way of broadcasting the ELB address (or preferably CNAME) to known entities across a network. For instance we know from a previous answer "Several host names (such as dnsseed.bluematt.me) are maintained that resolve to a list of IP addresses known to be running nodes." (http://bitcoin.stackexchange.com/a/3537/44818).  

---

## 1 answers

### Answer by username_3 on 2017-01-30. Score: 1 | Accepted answer

I think your scenario would work if you have a way of broadcasting the ELB address (or preferably CNAME) to known entities across a network. For instance we know from a previous answer "Several host names (such as dnsseed.bluematt.me) are maintained that resolve to a list of IP addresses known to be running nodes." (bitcoin.stackexchange.com/a/3537/44818).


---

