Re: relayd - conflict between outer and inner ip address

2008-11-11 Thread Stuart Henderson
On 2008-11-10, Jvrg Streckfu_ [EMAIL PROTECTED] wrote:
 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

Since this is redirect, it should work, providing you don't
configure 10.0.0.1 as an IP address on the loadbalancer itself.



Re: relayd - conflict between outer and inner ip address

2008-11-11 Thread Joerg Streckfuss
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



Re: relayd - conflict between outer and inner ip address

2008-11-11 Thread Joerg Streckfuss
 Since this is redirect, it should work, providing you don't
 configure 10.0.0.1 as an IP address on the loadbalancer itself.
 

I quite agree. The loadbalancer is configured with IP address 10.0.0.5 (CARP).
Only the directive listen on ... for the rediect in the relayd configuration
uses IP 10.0.0.1.



Re: relayd - conflict between outer and inner ip address

2008-11-10 Thread Jussi Peltola
On Mon, Nov 10, 2008 at 05:42:50PM +0100, Jvrg Streckfu_ wrote:
 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.

Are they running on separate machines? Have you assigned the same IP to
two boxes?

I guess you're looking for CARP between the loadbalancer and first web
server, but I think it'd be cleaner to have two loadbalancers and
redundancy between them.