Mailing List Archive

[mod_backhand-users] Should this work?
Hi, now that I know there are people out there to answer questions, here
is the start of my questions.

Here is what my situation is. Another web site uses our content as if it
were their own. They have a domain name of theirs pointed at one of our
servers, oursite.thiersite.com. Since I do not have control over their
DNS I can not do a DNS round robin or anything like that.

So I have set up backhand on the server that they are pointing to, and
another server in my domain.

Here is what the config looks like,


<IfModule mod_backhand.c>
UnixSocketDir /var/backhand/backhand
MulticastStats 192.168.88.161 192.168.88.255:4445
AcceptStats 192.168.88.0/24
</IfModule>

<Directory "/local/home2/iching/public_html/htbin">
AllowOverride None
#Options None
Options ExecCGI
Order allow,deny
Allow from all
Backhand byAge
Backhand byRandom
Backhand byLogWindow
Backhand byLoad
</Directory>


The servers are behind a file wall, and have internal ip's, I assume that
this is Ok.

Both servers configs are the same, and you can see both servers in a
backhand-status, but it isn't handing requests off to the other server.

Thanks in advance for any help.

-Jon
[mod_backhand-users] Should this work? [ In reply to ]
"Brandonlabs.com" wrote:
> Here is what my situation is. Another web site uses our content as if it
> were their own. They have a domain name of theirs pointed at one of our
> servers, oursite.thiersite.com. Since I do not have control over their
> DNS I can not do a DNS round robin or anything like that.

I am confused on how you actually get to the machines (if they have
nonroutable IPs)... One of them has to be exposed to the outside world
through some mechanism: firewall or something.

> <IfModule mod_backhand.c>
> UnixSocketDir /var/backhand/backhand
> MulticastStats 192.168.88.161 192.168.88.255:4445
> AcceptStats 192.168.88.0/24
> </IfModule>

If both of your conigs are the same, then the above MulticastStats line
wouldn't do what you want. Both servers would advertise themselves as
192.168.88.161... That won't help load balancing at all :) You need to
have the first parameter be the machines IP address. If a
gethostbyname(hostname) will return the desired IP, then you can omit
the first parameter. (If hostname returns 'foobar' and you have an
entry in /etc/hosts that says "192.168.88.161 foobar", for each
machine, respectively that would be easiest).

I typically set an entry in /etc/hosts for my `hostname` to be the one I
would desire to push traffic over to the other machines in my network.
(private IPs).

> <Directory "/local/home2/iching/public_html/htbin">
> AllowOverride None
> #Options None
> Options ExecCGI
> Order allow,deny
> Allow from all
> Backhand byAge
> Backhand byRandom
> Backhand byLogWindow
> Backhand byLoad
> </Directory>

OK.. So, with two servers, you will not gain anything from the Log
Window issues. I would suggest just doing byLoad and addPrediction.. Or
byCost and addPrediction. If you have 8 or more machines, Random
LogWindows will help.

--
Theo Schlossnagle
1024D/A8EBCF8F/13BD 8C08 6BE2 629A 527E 2DC2 72C2 AD05 A8EB CF8F
2047R/33131B65/71 F7 95 64 49 76 5D BA 3D 90 B9 9F BE 27 24 E7