Mailing List Archive

Multiple apache servers on one machine?
Greetings,

I'm working with 4.6-RELEASE fbsd and have setup an interface with 3
additional ip's:

inet 10.0.0.2 netmask 0xffffff00 broadcast 10.0.0.255
inet 10.10.10.2 netmask 0xffffffff broadcast 10.10.10.2
inet 10.10.10.3 netmask 0xffffffff broadcast 10.10.10.3
inet 10.10.10.4 netmask 0xffffffff broadcast 10.10.10.4

I would like to run three backhand enabled apache servers that each are
listening to one IP. I have 3 seperate server roots:

/mbh-0-1
/mbh-0-2
/mbh-0-3

Each has it's correctly permissioned ./backhand dir.

Each has it's own ./conf/httpd.conf file

Each has a config dir for it's own space, with an excerpt in
"/mbh-0-1/conf/httpd.conf" like such:

Listen 10.10.10.2:80

<IfModule mod_backhand.c>
UnixSocketDir /mbh-0-1/backhand
MulticastStats 10.10.10.255:4445
AcceptStats 10.10.10.0/24

<Location "/backhand/">
SetHandler backhand-handler
</Location>
</IfModule>

When I `/mbh-0-1/bin/httpd -f /mbh-0-1/conf/httpd.conf`

I get a successful start.

http://10.10.10.2/backhand/

Gives me:

0 mbh-0-1.internal 1028055929 10.0.0.2:80 423 MB 379 MB 0/0 0 [0] 275466 \
1 0.000/1 0.000

Take note to the oddness that the 'address' part is reporting 10.0.0.2:80

I would get the same thing if I went to http://mbh-0-1.internal/backhand/

My error_log gives:

[Tue Jul 30 18:43:01 2002] [notice] mod_backhand -- UnixSocketDir set to
/mbh-0-1/backhand
[Tue Jul 30 18:43:01 2002] [notice] mod_backhand -- Broadcast
10.10.10.255:4445 added
[Tue Jul 30 18:43:01 2002] [notice] mod_backhand -- Multicast accept
10.10.10.0/24
[Tue Jul 30 18:43:01 2002] [notice] backhand_init(75903) spawning moderator
(PID 75904)
[Tue Jul 30 18:43:01 2002] [notice] mod_backhand moderator ready to go
[Tue Jul 30 18:43:01 2002] [notice] Apache/1.3.26 (Unix) mod_backhand/1.2.1
configured -- resuming normal operations
[Tue Jul 30 18:43:01 2002] [notice] Accept mutex: flock (Default: flock)

Now here is my problem:

When I attempt to start another server:

`/mbh-0-2/bin/httpd -f mbh-0-2/conf/httpd.conf`

I get the following errors in my error log for /mbh-0-2/logs/error_log:

[error] (61)Connection refused: Child 64432 failed to establish umbilical to
moderator!
[error] (61)Connection refused: Child 64433 failed to establish umbilical to
moderator!

This will keep erroring until I kill /mbh-0-2/bin/httpd.

So my question being, is it possible to run a configuration like this? I
know it seems pointless, but it's helping me understand the internals more.

Also, why is backhand page reporting the address to be 10.0.0.2? I would
suppose that it wouldn't do that and instead use what is either in the
Listen directive or BindAddress for httpd.conf

Finally, I am attempting to do this so I can run serveral webservers on one
machine. Each server would be listenting on a different subnet ip like so:

SERVERS:
AA, BB, CC

IPS:
AA 10.10.10.2
AA 10.10.20.2
AA 10.10.30.2

BB 10.10.10.3
BB 10.10.20.3
BB 10.10.30.3

CC 10.10.10.4
CC 10.10.20.4
CC 10.10.30.4

Each server would have 3 apache webservers running with each having it's own
seperate serverroot where respectively each server would have it's
MulticastStats variable as:

AA 10.10.10.255:4445
AA 10.10.20.255:4445
AA 10.10.30.255:4445

BB 10.10.10.255:4445
BB 10.10.20.255:4445
BB 10.10.30.255:4445

CC 10.10.10.255:4445
CC 10.10.20.255:4445
CC 10.10.30.255:4445

Any information would be greatly appreciated.

Cheers,

-.mag
Multiple apache servers on one machine? [ In reply to ]
Mark A. Garcia wrote:

>Greetings,
>
>I'm working with 4.6-RELEASE fbsd and have setup an interface with 3
>additional ip's:
>
> inet 10.0.0.2 netmask 0xffffff00 broadcast 10.0.0.255
> inet 10.10.10.2 netmask 0xffffffff broadcast 10.10.10.2
> inet 10.10.10.3 netmask 0xffffffff broadcast 10.10.10.3
> inet 10.10.10.4 netmask 0xffffffff broadcast 10.10.10.4
>
>I would like to run three backhand enabled apache servers that each are
>listening to one IP. I have 3 seperate server roots:
>
>
Without code modification, this simply won't work.

mod_backhand is designed to balance between Apache instances based on
the resource information that instance has to use. If you run three
instances on the same machine, they are all advertising overlapping
resources -- which doesn't make much sense in this model.

The implementation binds to a specific UDP port. As this port needs to
be the same, the bind will fail on all subsequent Apache instaces that
are started.

There were plans to separate the resource discovery and distribution
mechanism from the rest of themod_backhand code base (as they could well
be useful for other applications). If this were done, you could run one
resource daemon and three backhand instances on the same machine. This
would solve the "can I" part of the problem -- but the "should I" part
still remains :-)

Why do you want to run three separate instances on the same machine and
"balance" them with mod_backhand. They are inherrently balanced as they
all use a single shared set of resources.

--
Theo Schlossnagle
Principal Consultant
OmniTI Computer Consulting, Inc. -- http://www.omniti.com/
Phone: +1 301 776 6376 Fax: +1 410 880 4879
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
Multiple apache servers on one machine? [ In reply to ]
On Wed, Jul 31, 2002 at 02:02:19PM -0400, Theo Schlossnagle wrote:
> Mark A. Garcia wrote:
>
> >Greetings,
> >
> >I'm working with 4.6-RELEASE fbsd and have setup an interface with 3
> >additional ip's:
> >
> > inet 10.0.0.2 netmask 0xffffff00 broadcast 10.0.0.255
> > inet 10.10.10.2 netmask 0xffffffff broadcast 10.10.10.2
> > inet 10.10.10.3 netmask 0xffffffff broadcast 10.10.10.3
> > inet 10.10.10.4 netmask 0xffffffff broadcast 10.10.10.4
> >
> >I would like to run three backhand enabled apache servers that each are
> >listening to one IP. I have 3 seperate server roots:
> >
> >
> Without code modification, this simply won't work.
>
> mod_backhand is designed to balance between Apache instances based on
> the resource information that instance has to use. If you run three
> instances on the same machine, they are all advertising overlapping
> resources -- which doesn't make much sense in this model.
>
> The implementation binds to a specific UDP port. As this port needs to
> be the same, the bind will fail on all subsequent Apache instaces that
> are started.
>
> There were plans to separate the resource discovery and distribution
> mechanism from the rest of themod_backhand code base (as they could well
> be useful for other applications). If this were done, you could run one
> resource daemon and three backhand instances on the same machine. This
> would solve the "can I" part of the problem -- but the "should I" part
> still remains :-)
>
> Why do you want to run three separate instances on the same machine and
> "balance" them with mod_backhand. They are inherrently balanced as they
> all use a single shared set of resources.

My test above was to simulate a test environment configuration wise,
without having to actually test this on three seperate machines.

The ultimate goal is to handle three websites and balance them over a
cluster of three servers. Each website has it's own server root on each
machine.

So, each server with be running three seperate apache servers.

Each site would have 3 IP's. The set of site IP's would be on seperate
subnet's, like so:

servers X Y Z
--------------------------------------------
Site A -> 10.10.10.2, 10.10.10.3, 10.10.10.4
Site B -> 10.10.20.2, 10.10.20.3, 10.10.20.4
Site C -> 10.10.30.2, 10.10.30.3, 10.10.30.4

Server X would have three server roots:

/www/A
/www/B
/www/C

With there own 'backhand' socket dir.

Server X would run an apache server for each server root that is listening to
the appropriate address and MulticastStats to the appropriate broadcast
address:

Apache(A) -> 10.10.10.255
Apache(B) -> 10.10.20.255
Apache(C) -> 10.10.30.255

So, site A would be served by apache server running on three 3 machines,
broadcasting to 10.10.10.255

Is what I'm doing valid with mod_backhand?

-.mag

>
> --
> Theo Schlossnagle
> Principal Consultant
> OmniTI Computer Consulting, Inc. -- http://www.omniti.com/
> Phone: +1 301 776 6376 Fax: +1 410 880 4879
> 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
>
>
>
>
>
> _______________________________________________
> backhand-users mailing list
> backhand-users@lists.backhand.org
> http://lists.backhand.org/mailman/listinfo/backhand-users
Multiple apache servers on one machine? [ In reply to ]
On Wednesday, July 31, 2002, at 08:23 , Mark A. Garcia wrote:
> My test above was to simulate a test environment configuration wise,
> without having to actually test this on three seperate machines.
>
> The ultimate goal is to handle three websites and balance them over a
> cluster of three servers. Each website has it's own server root on each
> machine.
>
> So, each server with be running three seperate apache servers.
>
> Each site would have 3 IP's. The set of site IP's would be on seperate
> subnet's, like so:
>
> servers X Y Z
> --------------------------------------------
> Site A -> 10.10.10.2, 10.10.10.3, 10.10.10.4
> Site B -> 10.10.20.2, 10.10.20.3, 10.10.20.4
> Site C -> 10.10.30.2, 10.10.30.3, 10.10.30.4
>
> Server X would have three server roots:
>
> /www/A
> /www/B
> /www/C
>
> With there own 'backhand' socket dir.
>
> Server X would run an apache server for each server root that is
> listening to
> the appropriate address and MulticastStats to the appropriate broadcast
> address:
>
> Apache(A) -> 10.10.10.255
> Apache(B) -> 10.10.20.255
> Apache(C) -> 10.10.30.255
>
> So, site A would be served by apache server running on three 3 machines,
> broadcasting to 10.10.10.255
>
> Is what I'm doing valid with mod_backhand?

In short, no.

Why do you want to run three Apache instances? That is more difficult
to administrate than running just one Apache instance serving different
document roots over the different IPs? You should be able to accomplish
this with <VirtualHost> directives and a single Apache instance.
Assuming you don't have any drastically conflicting requirement for the
Apache instances to serve these sites, it should be one Apache instance
serving N web sites over M IP address on a single machine. If you
follow this methodology, mod_backhand will work fine for you -- I use it
this way to serve N disparate web sites over M IP addresses (with M or
more machines).

--
Theo Schlossnagle
Principal Consultant
OmniTI Computer Consulting, Inc. -- http://www.omniti.com/
Phone: +1 301 776 6376 Fax: +1 410 880 4879
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
Multiple apache servers on one machine? [ In reply to ]
On Wed, Jul 31, 2002 at 11:34:30PM -0400, Theo Schlossnagle wrote:
>
> On Wednesday, July 31, 2002, at 08:23 , Mark A. Garcia wrote:
> >My test above was to simulate a test environment configuration wise,
> >without having to actually test this on three seperate machines.
> >
> >The ultimate goal is to handle three websites and balance them over a
> >cluster of three servers. Each website has it's own server root on each
> >machine.
> >
> >So, each server with be running three seperate apache servers.
> >
> >Each site would have 3 IP's. The set of site IP's would be on seperate
> >subnet's, like so:
> >
> > servers X Y Z
> >--------------------------------------------
> >Site A -> 10.10.10.2, 10.10.10.3, 10.10.10.4
> >Site B -> 10.10.20.2, 10.10.20.3, 10.10.20.4
> >Site C -> 10.10.30.2, 10.10.30.3, 10.10.30.4
> >
> >Server X would have three server roots:
> >
> >/www/A
> >/www/B
> >/www/C
> >
> >With there own 'backhand' socket dir.
> >
> >Server X would run an apache server for each server root that is
> >listening to
> >the appropriate address and MulticastStats to the appropriate broadcast
> >address:
> >
> >Apache(A) -> 10.10.10.255
> >Apache(B) -> 10.10.20.255
> >Apache(C) -> 10.10.30.255
> >
> >So, site A would be served by apache server running on three 3 machines,
> >broadcasting to 10.10.10.255
> >
> >Is what I'm doing valid with mod_backhand?
>
> In short, no.

Thanks. That's all I needed to know :-)

>
> Why do you want to run three Apache instances? That is more difficult
> to administrate than running just one Apache instance serving different
> document roots over the different IPs? You should be able to accomplish
> this with <VirtualHost> directives and a single Apache instance.
> Assuming you don't have any drastically conflicting requirement for the
> Apache instances to serve these sites, it should be one Apache instance
> serving N web sites over M IP address on a single machine. If you
> follow this methodology, mod_backhand will work fine for you -- I use it
> this way to serve N disparate web sites over M IP addresses (with M or
> more machines).

We have requirements that force us to use different Apache root's. I wish I
could just run one Apache instance serving different virtualhosts. Just our
isolated case, apart from everything else, requires us to have secure and
seperated Web server environments from each of our different clients.

>
> --
> Theo Schlossnagle
> Principal Consultant
> OmniTI Computer Consulting, Inc. -- http://www.omniti.com/
> Phone: +1 301 776 6376 Fax: +1 410 880 4879
> 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
>
>
> _______________________________________________
> backhand-users mailing list
> backhand-users@lists.backhand.org
> http://lists.backhand.org/mailman/listinfo/backhand-users