Mailing List Archive

persistence and web servers
Currently we have 3 webservers behind a DR lvs set up (2.2.18). Our scheme is
wlc and we have no persistence and use ldirectord.

When we take a server out of the rotation (by removing the index1.html file
ldirectord is looking for) I think all the connections to that machine are
dropped instead of being shuffled among the remaining 2 servers, is this the
case? I say this because our bandwidth suddenly drops to zero at this point.
I have started to use the weight and bring the weight to 1 then 0 (the
others are at 100) which seems to move the connections nicely.

My other question is this: will persistence help performance in a web cluster?
I know for ftp it's needed (or at least suggested in the docs) but I'm
wondering what gains if any we would get in a webserver environment. These
webservers are basically just file servers, html just images and videos.
Average file size is about 3MB.

Any ideas with the persistence question would be appreciated.

Thanks,
Jeff
Re: persistence and web servers [ In reply to ]
Jeffrey A Schoolcraft wrote:


> When we take a server out of the rotation (by removing the index1.html file
> ldirectord is looking for) I think all the connections to that machine are
> dropped instead of being shuffled among the remaining 2 servers, is this the
> case?

I'm not sure how ldirectord is setup, but I expect that it will think the
real-server
has died catastrophically, and will clear the ipvsadm entries for
this machine.

I say this because our bandwidth suddenly drops to zero at this point.
> I have started to use the weight and bring the weight to 1 then 0 (the
> others are at 100) which seems to move the connections nicely.

this is the usual way to bring a machine down.

> My other question is this: will persistence help performance in a web cluster?

it's neccessary for multi-port protocols, like ftp or if you need a client
on port 80 to be on the same machine when he goes to 443. If you have data
cached on one machine, that you'd like for speed for the client to stay
on that machine, rather than have the data generated anew on another machine,
then persistance also helps (eg squid).

> I know for ftp it's needed (or at least suggested in the docs) but I'm
> wondering what gains if any we would get in a webserver environment. These
> webservers are basically just file servers, html just images and videos.
> Average file size is about 3MB.

otherwise if the data is equally spread everywhere, and one machine is just
as good as another, then persistance is just a complication.

Joe


--
Joseph Mack PhD, Senior Systems Engineer, Lockheed Martin
contractor to the National Environmental Supercomputer Center,
mailto:mack.joseph@epa.gov ph# 919-541-0007, RTP, NC, USA
Re: persistence and web servers [ In reply to ]
Hello,

On Thu, 18 Jan 2001, Jeffrey A Schoolcraft wrote:

> Currently we have 3 webservers behind a DR lvs set up (2.2.18). Our scheme is
> wlc and we have no persistence and use ldirectord.
>
> When we take a server out of the rotation (by removing the index1.html file
> ldirectord is looking for) I think all the connections to that machine are
> dropped instead of being shuffled among the remaining 2 servers, is this the
> case? I say this because our bandwidth suddenly drops to zero at this point.

Hm, I don't know the ldirector internals but each user program
can "shutdown" a LVS real server by setting the weight to 0 for specific
time period.

> I have started to use the weight and bring the weight to 1 then 0 (the
> others are at 100) which seems to move the connections nicely.

Yes, the LVS user-kernel interface allows these cases:

- STOP: delete the real server, the traffic just stops but LVS does not
delete any connection entries until they expire. If the deleted
real server is added back its connections can continue if the transport
or the application allows this. This allows the short deletions not
to hurt the established connections. There are always user-level
problems that can require such behavior.

- SHUTDOWN: set weight to 0 (serve current connections but don't create
new connections to this server) for time maintained from the user program
and after that period expires the real server can be deleted (STOP) from
the user program, this is not a LVS decision.

- START: set the weight to > 0

So, basicly, LVS allows a real server to be deleted or its weight to
be changed, with weight 0 as a special case.

> My other question is this: will persistence help performance in a web cluster?
> I know for ftp it's needed (or at least suggested in the docs) but I'm
> wondering what gains if any we would get in a webserver environment. These
> webservers are basically just file servers, html just images and videos.
> Average file size is about 3MB.

The performance with persistence enabled can only slow down
due to the potential load balancing problems. Avoid using persistence
until it is required from the application level, for example for SSL.

> Any ideas with the persistence question would be appreciated.
>
> Thanks,
> Jeff


Regards

--
Julian Anastasov <ja@ssi.bg>