Am Mon, 10 Nov 2008 17:42:50 +0100
schrieb JC6rg StreckfuC [EMAIL PROTECTED]:
Hello,
I'm in the process to setup relayd as a loadbalancer, which will distribute
http request to three webservers. I think this is a really common setup.
I'm using OpenBSD 4.4
this is my config:
snip
www_public=10.0.0.1
www1= 10.0.0.1
www2= 10.0.0.2
www3= 10.0.0.3
interval 10
timeout 300
prefork 1
table hosts { $www1 $www2 $www3 }
redirect {
listen on $www_public port http
tag RELAYD
forward to hosts \
check http /index.html code 200 mode roundrobin
}
/snip
It seems that the first ip (10.0.0.1) which is also the public ip for the
webserver pool is unavailable. Each request, which should be forwarded to
the
first webserver will stuck for a moment and then relayd redirects it to
the next server in the pool. The ip address 10.0.0.1 will be skipped at any
time.
For me it looks like an ip conflict between relayd and the first webserver
If I take a different ip for $www_public, e.g 10.0.0.4 relayd works as
expected.
So is it mandatory for the directive 'listen on ...' to chose an ip address
which is not part of the webserver pool?
If it is possible to run relayd as described above i would prefer it
because
if
relayd stops working, the server with the outer ip address is still
reachable.
Otherwise in case of a failure the entire cluster will be unavailable.
Perhaps there are smarter ways to increase availability of relayd.
Regards, Joerg
Okey, i think i was missing some useful information about my setup
The loadbalancer consists of two dell 2850 server. Each system
is equipped with quad port network devices (d-link dfe580-tx supported by the
ste driver). Of course I'm using carp for redundancy between the boxes.
The configuration for relayd on the master is identical with the
configuration on the backup host.
box A (master)pfsyncbox B (backup)
running relayd running relayd
| |
+---+
|
VIP: 10.0.0.5
|
---
| | |
www1 www2www3
10.0.0.1 10.0.0.2 10.0.0.3
I hope this will help.
Regards, Joerg