LVS
lvs-users
Google
 
Web LinuxVirtualServer.org

Re: success: LV-NAT working

To: lvs-users@xxxxxxxxxxxxxxxxxxxxxx
Subject: Re: success: LV-NAT working
From: Joseph Mack <mack@xxxxxxxxxxx>
Date: Mon, 30 Apr 2001 19:08:00 -0400 (EDT)
On Mon, 30 Apr 2001, Alois Treindl wrote:

> 
> a)
> the rc.lvs_nat scripte created by configure seems to contain
> false code for option 'restart':
> restart)
>         ./configure stop
>         ./configure start
>         EXITCODE=0
>         ;;  

whoops, thanks

> 
> It should be: rc.lvs_nat stop/start
> 
> The error is in your perl code:
>         print RC_FILE " $0 stop \n";
>         print RC_FILE " $0 start \n";  
> 
> It would better be:
>         print RC_FILE ' $0 stop \n';
>         print RC_FILE ' $0 start \n';

oh dear. thanks.
I just run it without params where it runs like
$0 start.


> b) Question about loadbalancing http:
> ----------------------------------
> when I reload a page on the client (netscape 4.77 on Redhat 7.0),
> the browser makes several http hits on the server for the graphics
> in the page.
> These hits are load balanced between the real servers.
> I presume this is normal for HTTP/1.0 protocol,

seems right (haven't got a machine here to check)

> though I would
> have expected Netscape 4.77 to use HTTP/1.1 with one connection for
> all parts of a page. The server is Apache as it came on the Redhat 7.0
> CDROM.
> Do I misunderstand the HTTP protocol?

I asked a similar question about a year ago on this list and got silence.
According to the specs on http type persistence (there's a link in the
HOWTO), the browser and httpd negotiate for the highest level of
compatibility and negotiate persistence. However I don't know how
to tell apache whether to offer persistence or HTTP/1.1

Someone on this list must know.

> I have to expect problems, if the page is created by a CGI and
> contains dynamically created GIFs it it, as the hits for these gifs
> will land on a different realserver than the one where the cgi runs.

How is this a problem? I think it works this way...
The browser says to VIP:80 
"GET /index.html"

the httpd passes index.html to the client. The page assembles on the
client, where it finds a cgi instruction (say a page counter).
The client then says to VIP:80 to execute page_counter.cgi. Do you
care whether page_counter.cgi is on the wrong real-server? Even if the
cgi needs a whole lot of parameters, they'll still be coming from the
client.
 
> -> will I need persistence even for this simple case, which has not yet
> anything to do with session handling?

I'm not sure yet. I'll wait for your answer.

> -> how do I get it?
> (I see no option for it in the lvs_nat config script)

The script is general purpose and makes an attempt to add persistence when
it is needed for you, eg you have ftp or (http/https, you can add other
services to be persistent with "persistent_services" in the configure
script - although I haven't tested adding others much). I was going to
wait to see if that was a useful way of doing it. I was hoping that people
wouldn't have to decide to add persistence manually.

If you want to add it yourself, an alternate was would be to dump your
ipvsadm state with ipvsadm-save>ipvsadm.dump. The add persistence with
an editor to the http line and then load it back in.

$ipvsadm-restore<ipvsadm.dump

Joe
--
Joseph Mack mack@xxxxxxxxxxx



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