Bitcoin Forum
December 10, 2016, 09:03:37 AM *
News: To be able to use the next phase of the beta forum software, please ensure that your email address is correct/functional.
 
   Home   Help Search Donate Login Register  
Pages: [1]
  Print  
Author Topic: Loadbalancing a pool?  (Read 895 times)
Flowz
Member
**
Offline Offline

Activity: 114


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?

1481360617
Hero Member
*
Offline Offline

Posts: 1481360617

View Profile Personal Message (Offline)

Ignore
1481360617
Reply with quote  #2

1481360617
Report to moderator
1481360617
Hero Member
*
Offline Offline

Posts: 1481360617

View Profile Personal Message (Offline)

Ignore
1481360617
Reply with quote  #2

1481360617
Report to moderator
1481360617
Hero Member
*
Offline Offline

Posts: 1481360617

View Profile Personal Message (Offline)

Ignore
1481360617
Reply with quote  #2

1481360617
Report to moderator
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction. Advertise here.
1481360617
Hero Member
*
Offline Offline

Posts: 1481360617

View Profile Personal Message (Offline)

Ignore
1481360617
Reply with quote  #2

1481360617
Report to moderator
1481360617
Hero Member
*
Offline Offline

Posts: 1481360617

View Profile Personal Message (Offline)

Ignore
1481360617
Reply with quote  #2

1481360617
Report to moderator
Sukrim
Legendary
*
Offline Offline

Activity: 1848


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://bitfinex.com <-- leveraged trading of BTCUSD, LTCUSD and LTCBTC (long and short) - 10% discount on fees for the first 30 days with this refcode: x5K9YtL3Zb
Mail me at Bitmessage: BM-BbiHiVv5qh858ULsyRDtpRrG9WjXN3xf
Flowz
Member
**
Offline Offline

Activity: 114


Bitcoin = Money for the people, by the people.


View Profile
July 07, 2012, 02:53:10 PM
 #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
Global Moderator
Legendary
*
Offline Offline

Activity: 1932



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.

Tired of annoying signature ads? Ad block for signatures
Flowz
Member
**
Offline Offline

Activity: 114


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.
gweedo
Legendary
*
Offline Offline

Activity: 1246


Java, PHP, HTML/CSS Programmer for Hire!


View Profile WWW
July 07, 2012, 05:45:11 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.

Want to earn 2500 SATOSHIS per hour? Come Chat and Chill in https://goseemybits.com/lobby
Flowz
Member
**
Offline Offline

Activity: 114


Bitcoin = Money for the people, by the people.


View Profile
July 07, 2012, 07:55:26 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?
gweedo
Legendary
*
Offline Offline

Activity: 1246


Java, PHP, HTML/CSS Programmer for Hire!


View Profile WWW
July 07, 2012, 08:03:35 PM
 #8

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

Want to earn 2500 SATOSHIS per hour? Come Chat and Chill in https://goseemybits.com/lobby
Flowz
Member
**
Offline Offline

Activity: 114


Bitcoin = Money for the people, by the people.


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

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.
gweedo
Legendary
*
Offline Offline

Activity: 1246


Java, PHP, HTML/CSS Programmer for Hire!


View Profile WWW
July 07, 2012, 10:48:28 PM
 #10

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

Want to earn 2500 SATOSHIS per hour? Come Chat and Chill in https://goseemybits.com/lobby
Flowz
Member
**
Offline Offline

Activity: 114


Bitcoin = Money for the people, by the people.


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

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.
 
gweedo
Legendary
*
Offline Offline

Activity: 1246


Java, PHP, HTML/CSS Programmer for Hire!


View Profile WWW
July 08, 2012, 04:52:08 PM
 #12

I would run bitcoind under it is own account

Want to earn 2500 SATOSHIS per hour? Come Chat and Chill in https://goseemybits.com/lobby
Flowz
Member
**
Offline Offline

Activity: 114


Bitcoin = Money for the people, by the people.


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

I would run bitcoind under it is own account
Once you have access to the RPC login information, you can do anything.
gweedo
Legendary
*
Offline Offline

Activity: 1246


Java, PHP, HTML/CSS Programmer for Hire!


View Profile WWW
July 08, 2012, 08:02:27 PM
 #14

I would run bitcoind under it is own account
Once you have access to the RPC login information, you can do anything.
it has to do with the bitcoin.conf and who has access, I usually make my root password impossible to crack, and random numbers, and I use the sudoer file to do root commands and hand out different things, but having your bitcoind under it's own account creating the bitcoin.conf is just one more layer of security. To protect a bitcoind you need many layers, and I have may scripts that also help in attack situations. Plus you need to get your firewall and make sure no one can get to the port 8332, for incoming or outgoing unless it is one of those three servers.

Want to earn 2500 SATOSHIS per hour? Come Chat and Chill in https://goseemybits.com/lobby
Pages: [1]
  Print  
 
Jump to:  

Sponsored by , a Bitcoin-accepting VPN.
Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!