persistence and web servers
ja at ssi.bg
Thu Jan 18 22:48:59 GMT 2001
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
> 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.
Julian Anastasov <ja at ssi.bg>
More information about the lvs-users