Mailing List Archive

FW: help again!
Hi all,

Been trying to get my head round backhand, but i am still confused.. some
help will be greatfully received.

I have a main server that receives hits to the cgi scripts
they are located in
www1.mysite.com/cgi-bin/objects
/usr/home/mysite/cgi-bin/objects
193.109.194.33

When the cpu on www1 is at 75% capacity i want to push the requests to
www2.mysite.com/cgi-bin/objects
/usr/home/mysite/cgi-bin/objects
193.109.194.82

can anyone help me with the setup of my httpd.conf files...
can the level of cpu activity be set or is it automatic

the two server are on a 100Mb LAN connection
should the requests be passwd via TCP/IP or sockets.. how do I change to
each one?

if i set the directory to
<Directory "/usr/local/mysite/cgi-bin">
will request to cgi-bin/objects (a directory lower) be passed to the 2nd
server or is it only scripts in the actual cgi-bin directory itself?

heres the backhand snippet from my htpd.conf

<snip>

# <Directory ...>
# ... stuff ...
# Backhand byAge
# Backhand byRandom
# Backhand byLogWindow
# Backhand byCPU
# ... stuff ...
# </Directory>

# This will elminate servers you haven't heard from in a while
# Then randomize those remaining
# Then take the first log(n) (log base 2 of course)
# Then use the one with the highest idle CPU

<IfModule mod_backhand.c>
# UnixSocketDir is were the mod_backhand-Arriba file is stored
# (how fast your machine is) This directory must be readable and writable
# by euid of apache (nobody) Becuase the children have dropped privledges
# before they connect to UNIX domain socket in this directory.
# This directive is singular.
#
# MulticastStats of the form [<IP ADDR>] <BROADCAST ADDR>:<PORT> will set
# mod_backhand to broadcast server statistics on that address advertising
# for a server on <IP ADDR> or gethostbyname(gethostname())
# MulticastStats of the form [<IP ADDR>] <MULTICAST ADDR>:<PORT>,<ttl> will
# set mod_backhand to multicast server statistics on that address
# advertising for a server on <IP ADDR> or gethostbyname(gethostname())
# This directive is singular.
#
# AcceptStats <a.b.c.d>[/<mask>] (like 10.0.0.4 or 10.0.0.0/24) will accept
# statistics originating from that IP or IP network.
# This option can be cascaded.

UnixSocketDir /usr/local/apache/backhand
# MulticastStats 128.220.221.255:4445
MulticastStats 225.220.221.20:4445,1
AcceptStats 128.220.221.0/24


# This is a status of sorts. Visit it and see how valuable it is to you.
<Location "/backhand/">
SetHandler backhand-handler
</Location>
</IfModule>

</snip>


Many Thanks for any help

Gary
FW: help again! [ In reply to ]
On Wednesday, Nov 13, 2002, at 08:05 US/Eastern, Gary Sewell wrote:
> When the cpu on www1 is at 75% capacity i want to push the requests to

That type of load-balancing isn't balancing at all. It sounds like you
want a bucket pour over. That seems like a really poor approach to the
problem.

So, if the www2 machine has a load of 100 and the www1 machine has a
load of .75, you still want to pass it back? Why?

So, if you _really_ want to do this you will need to write your own
candidacy function in C.

otherwise, use:
Backhand byLoad 1

That will choose the www2 machine only if it's load is less that www1's
load - 1.

--
Theo Schlossnagle
Principal Consultant
OmniTI Computer Consulting, Inc. -- http://www.omniti.com/
Phone: +1 410 872 4910 x201 Fax: +1 410 872 4911
1024D/82844984/95FD 30F1 489E 4613 F22E 491A 7E88 364C 8284 4984
2047R/33131B65/71 F7 95 64 49 76 5D BA 3D 90 B9 9F BE 27 24 E7

-----------------------------------------------------------
-- Presenting at ApacheCon --
-- November 18th, 2002 --
-- Las Vegas, Nevada --
-- Backhand: understanding and building HA/LB clusters --
-- http://apachecon.com/2002/US/ --
-- --
-- Learn all there is to know about high availability --
-- internet systems and load balancing techniques --
-- focusing on applications driven by the Apache web --
-- server! --
-----------------------------------------------------------
FW: help again! [ In reply to ]
Hi Theo,

Thanks for replying.... my question wasnt really about the dynamics of the
backhand module but the configuration in httpd.conf...

I want to use backhand to deploy calls to any .cgi files in or below the
/cgi-bin folder...

My server details are

www1.mysite.com/cgi-bin/
/usr/home/mysite/cgi-bin/
193.109.194.33

www2.mysite.com/cgi-bin/
/usr/home/mysite/cgi-bin/
193.109.194.82

with www1 being the current server and www2 being a new server i have set up
and is ready to receive backhand calls....

I really wanted to know what i should have in each of the httpd.conf files

Thanks again

Gary Sewell

-----Original Message-----
From: backhand-users-admin@lists.backhand.org
[mailto:backhand-users-admin@lists.backhand.org]On Behalf Of Theo
Schlossnagle
Sent: 13 November 2002 3:16 PM
To: backhand-users@lists.backhand.org
Cc: Theo Schlossnagle
Subject: Re: [m_b_users] FW: help again!



On Wednesday, Nov 13, 2002, at 08:05 US/Eastern, Gary Sewell wrote:
> When the cpu on www1 is at 75% capacity i want to push the requests to

That type of load-balancing isn't balancing at all. It sounds like you
want a bucket pour over. That seems like a really poor approach to the
problem.

So, if the www2 machine has a load of 100 and the www1 machine has a
load of .75, you still want to pass it back? Why?

So, if you _really_ want to do this you will need to write your own
candidacy function in C.

otherwise, use:
Backhand byLoad 1

That will choose the www2 machine only if it's load is less that www1's
load - 1.

--
Theo Schlossnagle
Principal Consultant
OmniTI Computer Consulting, Inc. -- http://www.omniti.com/
Phone: +1 410 872 4910 x201 Fax: +1 410 872 4911
1024D/82844984/95FD 30F1 489E 4613 F22E 491A 7E88 364C 8284 4984
2047R/33131B65/71 F7 95 64 49 76 5D BA 3D 90 B9 9F BE 27 24 E7

-----------------------------------------------------------
-- Presenting at ApacheCon --
-- November 18th, 2002 --
-- Las Vegas, Nevada --
-- Backhand: understanding and building HA/LB clusters --
-- http://apachecon.com/2002/US/ --
-- --
-- Learn all there is to know about high availability --
-- internet systems and load balancing techniques --
-- focusing on applications driven by the Apache web --
-- server! --
-----------------------------------------------------------


_______________________________________________
backhand-users mailing list
backhand-users@lists.backhand.org
http://lists.backhand.org/mailman/listinfo/backhand-users