Page 1 of 1

Some users getting "unknown work" [20 BTC reward] [SOLVED]

Posted: Wed Sep 07, 2011 1:44 pm
by Davincij15
Hi

If anyone can suggest a solution to my problem that works I will pay 20 BTC you can check my record of payments here...
https://bitcointalk.org/index.php?topic=33612.180

Anyhow, I have pushpoold and namecoind running on all 3 servers. Each server has a copy of my wallet and virtually identical. The domain name NMCBIT.COM is set to Round Robin all 3 servers and some people get lots of "unknown-work" rejects. http://www.nmcbit.com/statistics

My guess is they bounce from one server to another requesting work from one server and submitting it to another server.

My guess is that I have a) create a DNS b) create a proxy server to forward requests.

I am hoping for a more simple solution.

Davinci

Re: Some users getting "unknown work" [20 BTC reward]

Posted: Thu Sep 08, 2011 6:30 am
by tysat
Is there a reason to have it on all 3 servers?

If you're set on it, then here's what I would do:

The first time you get something from a specific IP, have a proxy assign it to one of the servers (round robin style).
If you really want to get tricky, have it update a DB with last contact from that IP and then every however often you want have a cron job clear the DB of entries older than an hour or so.

This won't give you a perfect load balance, because people will have a different hash rate... but it'll balance somewhat.

Another option is to show the stats of the 3 servers on the website and let people pick for themselves.

Re: Some users getting "unknown work" [20 BTC reward]

Posted: Thu Sep 08, 2011 11:12 am
by Davincij15
tysat wrote:Is there a reason to have it on all 3 servers?

If you're set on it, then here's what I would do:

The first time you get something from a specific IP, have a proxy assign it to one of the servers (round robin style).
If you really want to get tricky, have it update a DB with last contact from that IP and then every however often you want have a cron job clear the DB of entries older than an hour or so.

This won't give you a perfect load balance, because people will have a different hash rate... but it'll balance somewhat.

Another option is to show the stats of the 3 servers on the website and let people pick for themselves.
Thanks for the suggestions they are all good and I wish I had the time implement just one but I am looking for a faster solution. As for why I have more than one server? Well there are 2 reasons...

1. I am using Amazon EC2 micro VMs.
2. Bitcoin growth is explosive I want to be ready to just add servers should that happen to me
3. (I know I said 2) It's fun to play with clustered servers. :)

I guess there is no options or settings or out of the box software I can use to fix this?

Re: Some users getting "unknown work" [20 BTC reward]

Posted: Thu Sep 08, 2011 3:57 pm
by tysat
Davincij15 wrote:I guess there is no options or settings or out of the box software I can use to fix this?
I'll talk to some people at work today and see if there are any easier options (do a lot of networking stuff).

Re: Some users getting "unknown work" [20 BTC reward]

Posted: Thu Sep 08, 2011 5:43 pm
by Davincij15
tysat wrote:
Davincij15 wrote:I guess there is no options or settings or out of the box software I can use to fix this?
I'll talk to some people at work today and see if there are any easier options (do a lot of networking stuff).
Thanks!

Check out my stats page.

http://www.nmcbit.com/statistics

you can see the one person has HUGE percent of rejects while everyone else including me has very tiny percent of rejects. Weird. Checking the DB I do get a few "unknown-work" rejects in fact most of my rejects are "unknown-work". Also flushing the DNS cache on my PCs constantly does not cause the unknown-work problem.

Perhaps my miner software submits the requested work to the same server unless it can't get to it. I don't know I am just guessing.

Re: Some users getting "unknown work" [20 BTC reward]

Posted: Fri Sep 09, 2011 3:44 am
by Davincij15
Took me a bit of thinking to find the name but I knew someone had done it! What I was looking for is called TCP/IP Relay!
A product called balance works perfectly for bitcoin:

http://manpages.ubuntu.com/manpages/har ... nce.1.html

HERE IS THE KEY INFO TO READ:

Code: Select all

A "%" instead of a "!" as a group separator declares the previous group
to  be  of  type  "hash".   This  means  that  instead of a round-robin
algorithm, a hash distribution based on the client ip address  is  used
to determine the destination channel. This allows connecting one client
always to the same server (e.g. balancing http  sessions  to  a  single
server).
AWESOME!