I'm experimenting with Open Source code available on Github (
https://github.com/UNOMP/unified-node-open-mining-portal) to run a mining pool.
We got everything working and started mining with everything deployed on Digital Ocean’s server having 20 CPUs and 64 GB RAM. But as soon as we connected enough miners to reach 1 PH/s, we started getting socket errors and the CPU usage crossed 80% and the miner connections started dropping off.
Next, we shifted the entire setup to AWS using a c4.8xlarge instance. Now we could reach only upto 800 workers (3.7PH/s) and similar problems started coming up.
I did a little digging into the setup and here is what it contains
1 Bitcoin Server (a full node which runs in the server mode and accepts connections through the RPC protocol) - runs using bitcoind - Is one of the concerns as it is single threaded and I am unable to run it in a multi-threaded way.
1 Node Stratum Server
https://github.com/UNOMP/node-merged-pool - this connects to the bitcoin server above using rpc and this also eats up a lot of CPU
Node Servers for Frontend / Payments / etc - this works fine
Now, that we have the overview of the scenario and the problem.
Here are the questions that come up to mind:
1. Can we run bitcoind in a multi-threaded way?
2. Can we run bitcoind in a distributed setup (with multiple servers behind a load balancer)?
3. Can we run the node stratum miner in a distributed setup (with multiple servers behind a load balancer)?
Any expert who have come across same problem or understand the need are welcome to help me. Answers, comments and thoughts are really appreciated.
Thanks in advance!