0

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

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 or others.

Is this feasible?

For a detailed list of types of nodes, see this wonderful graphic from the book, 'Mastering Bitcoin'.

  • 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 Jan 29 '17 at 18:00
  • 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 Jan 29 '17 at 18:04
  • 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 Jan 29 '17 at 20:26
  • 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 Jan 30 '17 at 4:50
  • 1
    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). – Alex Jan 30 '17 at 10:26
1

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).

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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