LVS
lvs-users
Google
 
Web LinuxVirtualServer.org

RE: fwmarks usage

To: "LinuxVirtualServer.org users mailing list." <lvs-users@xxxxxxxxxxxxxxxxxxxxxx>
Subject: RE: fwmarks usage
From: "Francois JEANMOUGIN" <Francois.JEANMOUGIN@xxxxxxxxxxxxxxxxx>
Date: Tue, 30 Dec 2003 16:29:43 +0100

Joe:
> I don't know anything about keepalived. How do you declare it, or is
> this it?

I find keepalived much more easy to use to configure my director. Here is my 
entry for the fwmark rule :

virtual_server [RIP masked here] fwmark 1 {
    delay_loop 20
    lb_algo rr
    lb_kind DR
    persistence_timeout 1800
    persistence_granularity 255.255.255.0
    protocol TCP
    virtualhost www.toto.com
    real_server 172.16.1.4 80 {
        weight 1
        HTTP_GET {
            url {
              path /index.jsp
            }
            connect_port 8083
            connect_timeout 10
            nb_get_retry 5
            delay_before_retry 20
        }
    }
}

And here is it for the "standard users" :

virtual_server [VIP really masked, for sure] 80 {
    delay_loop 20
    lb_algo rr
    lb_kind DR
    persistence_timeout 1800
    persistence_granularity 255.255.255.0
    protocol TCP
    virtualhost www.toto.com
    real_server 172.16.1.4 80 {
        weight 1
        HTTP_GET {
            url {
              path /index.jsp
            }
            connect_port 8083
            connect_timeout 10
            nb_get_retry 5
            delay_before_retry 20
        }
    }
    real_server 172.16.1.5 80 {
        weight 1
        HTTP_GET {
            url {
              path /index.jsp
            }
            connect_port 8083
            connect_timeout 10
            nb_get_retry 5
            delay_before_retry 20
        }
    }
}

So, in one file, you have both you're load balancing and you're HA settings. Of 
course, you need to configure iptables by yourself. Also, it doesn't do 
anything on the realservers (but on the realservers, I just need to configure 
the VIPs and noarpctl things, which is easy).

I like it.

François.

<Prev in Thread] Current Thread [Next in Thread>