RE: Pen webserver with multiple domains

From: Ulric Eriksson (
Date: Tue Sep 23 2003 - 12:29:52 CEST

On Tue, 23 Sep 2003, Michiel van Es wrote:

> Unchanged?

Pen receives the request from the client and passes it on, unchanged, to
the backend server. The server sees the load balancer's IP address and
logs that. That's what penlog is supposed to take care of.

> I tried the penlogd and the apahce conf so that al logfiles are parsed to
> the penlogd host but still do I get the local Load Balncer ip-adress and not
> the real ip-adress from the client!

Did you use the -l option? Otherwise there is no way for penlogd to know
the client's address.

Here's an example. Start pen like this on the host "www":

        /opt/bin/pen -w /var/run/penstats.html \
                -p /var/run/ -l last1:10000 \
                www:www web1:www web2:www web3:www

And penlogd like this on the host called "last1":

        /opt/bin/penlogd -p /var/run/ \
                -l /var/log/apache/logs/access_log 10000

> How do I force round-robin btw?
> I tried pen with the default settings for http: ./pen http host1:80 host2:80
> and the request are only received at host1:80.

./pen -r http host1:80 host2:80

The -r is for round robin.

> I want to make pen swicth between the requests and if 1 server failes, he
> will do forced redudancy so that he passes all request on to the only
> server.

The failover will happen anyway.

Pen defaults to "stickyness" because it is the safe thing to do: necessary
if you have state on the backend servers and mostly harmless otherwise.

> Can I also put the real headers/ip-adress in smtp?
> I everyhting seems to come from the Load balancers' ip-adress but
> I want to have the mailservers think it comes from the original sending
> host.
> This for not garbling the maillog file and for open relay.

That's a bit trickier.

For outgoing mail ("smart host"), just use an access list to control who
can send mail.

For incoming mail... I wouldn't do that. ;-) And it's not really necessary
as smtp has failover built in.


This archive was generated by hypermail 2.1.2 : Tue Sep 23 2003 - 12:30:21 CEST