Bitcoin Forum
June 17, 2024, 05:10:17 AM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: Loadbalancing a pool?  (Read 1039 times)
Flowz (OP)
Member
**
Offline Offline

Activity: 114
Merit: 10


Bitcoin = Money for the people, by the people.


View Profile
July 07, 2012, 07:37:07 AM
 #1

Hi,
So I am currently running a pool, and I noticed that the CPU-usage is pretty high (shit hitting the fan 360%) under a load > 20GH/s.
I came to the asssumption that they must use load-balancing to spread the miners over multiple hosts.

1. Is it correct, that big pools use loadbalancing?

Sukrim
Legendary
*
Offline Offline

Activity: 2618
Merit: 1006


View Profile
July 07, 2012, 02:23:39 PM
 #2

Is your poolserver written in PHP or JavaScript?! Roll Eyes

What program exactly causes that load?

https://www.coinlend.org <-- automated lending at various exchanges.
https://www.bitfinex.com <-- Trade BTC for other currencies and vice versa.
Flowz (OP)
Member
**
Offline Offline

Activity: 114
Merit: 10


Bitcoin = Money for the people, by the people.


View Profile
July 07, 2012, 02:53:10 PM
Last edit: July 07, 2012, 03:05:34 PM by Flowz
 #3

Is your poolserver written in PHP or JavaScript?! Roll Eyes

What program exactly causes that load?

The back-end is PoolServerJ, which is coded in Java.

I'm talking about loadbalacing the miners over multiple hosts.

In theory, it's all possible, it like loadbalancing normal HTTP traffic, I'm just wondering if any of you have gotten experience with it?
grue
Legendary
*
Offline Offline

Activity: 2058
Merit: 1431



View Profile
July 07, 2012, 04:24:54 PM
 #4

round robin DNS?

It is pitch black. You are likely to be eaten by a grue.

Adblock for annoying signature ads | Enhanced Merit UI
Flowz (OP)
Member
**
Offline Offline

Activity: 114
Merit: 10


Bitcoin = Money for the people, by the people.


View Profile
July 07, 2012, 05:09:56 PM
 #5

round robin DNS?

I knew someone would suggest it,
but a round-robin DNS in some cases returns a list of multiple IP addresses.
This could form an issue, for a miner.
Example:
Let's assume the miner always pick the IP at the top of the list (happens in most cases).
----------------------------------
First DNS-request returns:
----------------------------------
IP1
IP2
IP3

Now if the miner does another DNS request, which might happen each time it asks for work by the server and sends work to the server.
(This is in theory, each miner-software differ from internal structure.)

----------------------------------
Second DNS-request returns:
----------------------------------
IP2
IP3
IP1

Now it could use IP1 to ask for work, and it could send the the work back to IP2 which would make it invalid

-> Ofcourse, it could not be like this, I'll have to see how a miner does it, but it's a theory/assumption.
-> In practice it's easy to solve at the miners side, > simply pass an IP instead of a domain by doing one single DNS-request up-front. But that's not so professional.
-> You might say: well don't make it return a list then but only one single IP, well that would still form an issue.

I'm currently looking into the structure of an existing miner, to see how it handles the target url.
Flowz (OP)
Member
**
Offline Offline

Activity: 114
Merit: 10


Bitcoin = Money for the people, by the people.


View Profile
July 07, 2012, 07:55:26 PM
 #6

You probably want to start making subdomains and different servers, so have poolserverj running on about 3 different servers, each with a different subdomain IE: pool1, pool2, etc. Then using one apache server as your gateway round robin, or depending on which server is the most idle or not being used at that time, have it being servered thru that. It want to try and get poolserverj to sync with each other so it can all be working together.
Couldn't that be achieved by putting bitcoind and the share logging on a fourth server?
Flowz (OP)
Member
**
Offline Offline

Activity: 114
Merit: 10


Bitcoin = Money for the people, by the people.


View Profile
July 07, 2012, 08:42:53 PM
 #7

You probably want to start making subdomains and different servers, so have poolserverj running on about 3 different servers, each with a different subdomain IE: pool1, pool2, etc. Then using one apache server as your gateway round robin, or depending on which server is the most idle or not being used at that time, have it being servered thru that. It want to try and get poolserverj to sync with each other so it can all be working together.
Couldn't that be achieved by putting bitcoind and the share logging on a fourth server?
you can do that, and you probably want to put the bitcoind on it's own server so no cpu usage is taken due to the bitcoind. you want to focus on optimizing  now too
Put bitcoind on the first server, maybe a server that is a bit bigger in memory and cpu then the other 2.
Server 1 runs local on the bitcoind, other across the network.

To be honest, it's pretty optimizable.
Server 1: Front-end + bitcoind.
Server [2 + 3]: Back-end.

Front-end needs some extra room to breath.
Flowz (OP)
Member
**
Offline Offline

Activity: 114
Merit: 10


Bitcoin = Money for the people, by the people.


View Profile
July 08, 2012, 07:52:19 AM
 #8

The only concern is the frontend and bitcoind are on the same server, but that is from a security stand. Otherwise that setup should be fine
Run bitcoind on the root account and the front-end on a different less-privileged account.
In the end -> front-end always contains the RPC login information for the bitcoind daemon to do pay-outs, etc.. so it always forms a concern from a security point of view.
 
Flowz (OP)
Member
**
Offline Offline

Activity: 114
Merit: 10


Bitcoin = Money for the people, by the people.


View Profile
July 08, 2012, 07:25:12 PM
 #9

I would run bitcoind under it is own account
Once you have access to the RPC login information, you can do anything.
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!