mining-pool / not-only-mining-pool

new generation general mining pool in go
MIT License
45 stars 34 forks source link

Main and Backup BTC Servers #2

Closed ashaw1131 closed 3 years ago

ashaw1131 commented 3 years ago

Since it is industry standard to have a main node and a backup node, would it be possible to add a second server for this connect to if a main server goes down? For redundancy issues.

Scenario Stratum Server is connected to main btc node, main btc node goes down, stratum server instantly connects to a backup btc node and continues to serve jobs.

Most Stratum services that I have seen offer this capability so this is just an idea.

c0mm4nd commented 3 years ago

This feature has been implemented. Just add more daemon objects in daemons field like this.

  "daemons": [
    {
      "host": "127.0.0.1",
      "port": 18332, // bitcoind
      "user": "bitcoinrpc",
      "password": "testnet"
    },
    {
      "host": "127.0.0.1",
      "port": 18334, // btcd
      "user": "bitcoinrpc",
      "password": "testnet",
      "tls": {} // means tls enabled
    }
  ],
ashaw1131 commented 3 years ago

Missed the point of this I guess, when one goes down, the pool halts, it should switch to the next server

c0mm4nd commented 3 years ago

This is a standalone server not a portal nor web engine, so it doesn't sense any other pool and cannot do stream forwarding when it panic.

It would be better to get load balance/DDoS protection services from cloud computing service/other professional firmware, which will be more stable than running a software.

So currently this feature won't be implemented.