Mailing List Archive

mod_backhand
Dear Mr. Theo,
First let me say that I very much like the idea of backhand. I also am
happy to see someone furthering the open source values. I have been
doing test with your module and apache 1.3.12 which is a redhat 6.2
stock rpm. I also have added MOSIX into the mix. Anyhow I need to ask a
few questions. the backhand stats do not show the number of available
servers or ready servers, After some debugging I found out that your
module assumes there will be a scoreboard file, this is not the case
when it is a shared module in redhat 6.2 for that RPM uses the shared
memory version of the scoreboard for performance reasons. I would like
to be able to use backhand just as a module and not recompile apache
every time a new version of either apache or your module comes out. I
was wondering if you can look into making your module use the shared
memory scoreboard.
On another note on redhat 6.2 I see that the servers don't see each
other until I make a source change. You have a sendmsg for the unix
sockets, I do the following:
file is apue.c
225c225
< if(sendmsg(clifd, &msg, 0) != 2)
---
> if(sendmsg(clifd, &msg, AF_UNIX) != 2)

After this change I can see my other nodes, without changing it to
AF_UNIX they never appear to see each other. Maybe this is a bug maybe
not. I have very little time to actually deal with the source as I am
working hard on the MOSIX side of things.
Let me give you some background. I have 6 machines running mosix on
their own private network. the first machine which I call the master has
two nic's in it, web requests come into that nic and then the apache
running there with php and backhand should redirect it to the other 5
machines. The problem is I don't think your module can proxy it's self
back out from where it came the main machine is running IP masq, however
it still is unable to send the data back to the requesting client.
Anyhow Thanks for your work in this module and if you have any
suggestions or beta code I could help test I would be grateful.
Thanks,
Leif Jackson
--
+-------------------------------------------------------+
| Jones Jackson Consulting & Isle of Avalon Networks |
| Programmer && Linux Enthusiast http://www.jjcons.com |
| "Linux is NT's ultimate Service pack" - Adam Wright |
+-------------------------------------------------------+
PGP Key fingerprint = 6A B4 B3 F2 4B 78 64 EA 2B A7 23 98 AF EA EE 29
http://isle.comstar.net/~leif/pgpkeys.html for the full key.
Re: mod_backhand [ In reply to ]
This is a multi-part message in MIME format.
--------------759F2439838296910E6D2F88
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit

First, thanks for your interest in mod_backhand.

I test mod_backhand here on a cluster of >10 machines running MOSIX.
MOSIX is one of the coolest things I have ever worked with (and I have
been working with it since it was a binary BSDI patch). However, as
processes take time ot migrate (and MOSIX handles this correctly) it is
not attuned for webservering tasks. It should hurt, but I doubt it will
help unless you process run at least a second long and consume
considerable resources. In fact, we find that it actually gets in the
way of Apache and start apache with a mosrun (flags to NOT migrate).

As for the sendmsg needing AF_UNIX -- <grunt>. I run this on Linux
(RedHat 6.2) and it works fine. sendmsg's thrid paramter doesn't have
anything to do with socket type. It is the flags for sending the
message: (Out-of-band, Don't route, Non-blocking, and/or No SIGPIPE on
error). AF_UNIX is defined as 1 on Linux which is equal to the
"correct" MSG_OOB flag that can be passed to sendmsg.

Why you would be needing to send messages out of band is curious, to say
the least. Escpecisally becuase (as far as I remember) AF_UNIX sockets
don't support out of band message sending!

About the scoreboard. I use a scoreboard, but it does support a
scoreboard in shared memory. So, it isn't lack of shared memory support
that causes this. It is flakiness in the way Apache initializes its
children. Apache call initialize twice and most often the shared memory
scoreboard has not yet been attached, so when we try to attach to the
"existing" shared memory scoreboard, it fails miserably. This is
documented in the FAQ. Solution: wait a few seconds (make sure your
site is serving pages) and do a apachectl graceful. This will cause a
reinitialization and since the shmmem scoreboard now exists, the attach
is successful.

I exclusively run mod_backhand as a shared module for the exaclt reason
you stated. And everytime I restart my servers I follow that with a
graceful restart. And I see the available servers. I run mod_backhand
on some frontend accelerator thathave a habit of having no available
servers, so I use the backhand-handler to monitor that.

On Solaris, on the other hand, I run mod_backhand statically compiled
because there are problems with file A loading B and B loading C and
then unloading B (The apache double initialization annoyance -- I
think).

About the reason mod_backhand can't talk to your clients? I don't
understand the network topology you described. I have run all my server
behind a firewall and all in front of a firewall, but I have never
attempted running some on one side and some on the other. If you
describe your architecture using IP addresses and network addresses, it
may give me a better idea of what is going on.

Good luck!

Leif Jackson wrote:
> First let me say that I very much like the idea of backhand. I also am
> happy to see someone furthering the open source values. I have been
> doing test with your module and apache 1.3.12 which is a redhat 6.2
> stock rpm. I also have added MOSIX into the mix. Anyhow I need to ask a
> few questions. the backhand stats do not show the number of available
> servers or ready servers, After some debugging I found out that your
> module assumes there will be a scoreboard file, this is not the case
> when it is a shared module in redhat 6.2 for that RPM uses the shared
> memory version of the scoreboard for performance reasons. I would like
> to be able to use backhand just as a module and not recompile apache
> every time a new version of either apache or your module comes out. I
> was wondering if you can look into making your module use the shared
> memory scoreboard.
>
> On another note on redhat 6.2 I see that the servers don't see each
> other until I make a source change. You have a sendmsg for the unix
> sockets, I do the following:
>
> file is apue.c
> 225c225
> < if(sendmsg(clifd, &msg, 0) != 2)
> ---
> > if(sendmsg(clifd, &msg, AF_UNIX) != 2)
>
> After this change I can see my other nodes, without changing it to
> AF_UNIX they never appear to see each other. Maybe this is a bug maybe
> not. I have very little time to actually deal with the source as I am
> working hard on the MOSIX side of things.
>
> Let me give you some background. I have 6 machines running mosix on
> their own private network. the first machine which I call the master has
> two nic's in it, web requests come into that nic and then the apache
> running there with php and backhand should redirect it to the other 5
> machines. The problem is I don't think your module can proxy it's self
> back out from where it came the main machine is running IP masq, however
> it still is unable to send the data back to the requesting client.
>
> Anyhow Thanks for your work in this module and if you have any
> suggestions or beta code I could help test I would be grateful.
>
> Thanks,
> Leif Jackson
>
> --
> +-------------------------------------------------------+
> | Jones Jackson Consulting & Isle of Avalon Networks |
> | Programmer && Linux Enthusiast http://www.jjcons.com |
> | "Linux is NT's ultimate Service pack" - Adam Wright |
> +-------------------------------------------------------+
>
> PGP Key fingerprint = 6A B4 B3 F2 4B 78 64 EA 2B A7 23 98 AF EA EE 29
> http://isle.comstar.net/~leif/pgpkeys.html for the full key.

--
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
--------------759F2439838296910E6D2F88
Content-Type: text/x-vcard; charset=us-ascii;
name="theos.vcf"
Content-Transfer-Encoding: 7bit
Content-Description: Card for Theo E. Schlossnagle
Content-Disposition: attachment;
filename="theos.vcf"

begin:vcard
adr;dom:;;116 W University Pkwy, Apt #1310;Baltimore;MD;21210;
n:Schlossnagle;Theo Ezell
x-mozilla-html:FALSE
org:OmniTI, Inc.
version:2.1
email;internet:theo@omniti.com
title:Senior Systems Engineer & Engineering Project Manager
tel;fax:410 880 4879
tel;home:410 889 3494
tel;work:301 776 6376
note;quoted-printable:ICQ: 19592343=0D=0A=0D=0A- Network Design=0D=0A- Distributed System Desi
fn:Theo Ezell Schlossnagle
end:vcard

--------------759F2439838296910E6D2F88--