I'm currently trying to code my own BTC proxy mining pool that need to handle at least 20k workers but I'm still in need of information to build it correctly.

My main inquiry is about the TCP connection between my proxy pool and the pool.

Should I need to open a connection between the proxy and the pool for each worker or should I create a single connection for all worker in my proxy?

I think the best option in my case is the second one (open 20k connections with the same ip may result as ban?) but it implies more work to do and understanding.

In that case how should I manage the high difficulty of the pool and the vardiff?

Thanks you for you answer and don't hesitate to share me all interesting links you have about it!

1 Answer 1


Holding one connection per worker is highly inefficient and will cause a lot of traffic going through your network. The preferred way to do this is to condense all your work behind some proxy. You don't need to have only one proxy. Multiple proxies with dozens or hundreds of devices per proxy is fine too.

As for the diff, the proxy may set a high enough diff that you'll generate a few shares per minute in all machines, to reduce network traffic.

  • Like if I have 1000 workers, I make 10 proxies with 100 workers each ? And these 10 proxies with one connection for each worker to the pool or only one for the proxy (100 workers) ? If single connection for one proxy how do I share the job to the workers ? Do I give each worker the job gived by the pool or I create sub job of my own ? Thanks you for your time I really apreciate it
    – ByFish
    Commented Dec 28, 2023 at 10:17
  • Like if I have 1000 workers, I make 10 proxies with 100 workers each ? exactly. Ideally, you'd give different jobs to each worker. One way you can do that by assigning different extra-nonce spaces to each work. So you get a job from the pool with e.g. 32-bit extra-nonce space and you break that down into multiple, per proxy spaces. Commented Dec 28, 2023 at 19:55
  • Thanks you for your precious advices, are you available somewhere I can contact you to go deeper in technical things? (@ByFishh on twitter)
    – ByFish
    Commented Dec 29, 2023 at 10:21

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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