Horms wrote :
On Thu, Apr 29, 2004 at 12:45:06AM +0200, Sebastien BRIZE wrote:
Hi,
I'm looking, like many people, for a nice kerneled L7 switch,
and LVS seems to be not so far from this goal...
My idea is :
KTCPVS uses schedulers :
tcp_vs_chttp_schedule(struct tcp_vs_conn *conn, struct tcp_vs_service *svc)
which seem to be very near of the IPVS schedulers :
ip_vs_wrr_schedule(struct ip_vs_service *svc, struct iphdr *iph)
But KTCPVS doesn't seem to spoof packets with the client source IP,
unlike IPVS (am I wrong ?...).
My question is : would it be hard to make the KTCPVS schedulers
match the IPVS scheduler's structure and integrate them in the IPVS code ?
/"LVS takes the decision at the first packet arrived (SYN/-, no data).
When the packet containing data arrives it is too late to take a
load-balancing decision." is from :
http://marc.theaimsgroup.com/?l=linux-virtual-server&m=100136373311795&w=2
/Is that assertion still true ? It would close that discussion right here.
Yes that certainly is true. However I don't think it would exclude
KTCPVS from using IPVS schedulers. Scheduling the packet when the first
packet arrives is a property of the LVS core code, not its schedulers.
That said, LVS schedulers only care about IP addresses and ports.
For L7 you would likely want to examine the payload. This would
require extending the LVS sheduler API. Just passing the entire skb
to the scheduler is an obvious choice to me.
Actually, now I think about it. If you are using any of the existing LVS
schedulers, then you are only using L4 information. What would be the
value of hooking them into L7?
Thanx Horms for yuor answer,
I think I was not clear in my explanation ;-)
My meaning was to use "KTCPVS-like" schedulers throught the IPVS core,
not the reverse.
I already use IPVS schedulers using the L4 information for session-less
applications,
but I would like to use it in L7 mode, so that the persistence may
reside in a cookie.
Using this method allows anyone to reconnect after a long time (1 day)
and to be
re-balanced to the same server.
This method obviously uses less memory than the L4 method ...??
Anyway, this allows any PHP, CGI application to work on 2 servers
without loosing
applicative session informations.
At this time, I can't use L4 balancing algorithm, on such applications,
because the persistence would require too much memory to be kept...
I prefer to use a crossed regular/backup algorithm, that directs
a bunch of sites on one server, and another bunch on it's backup, and in
case of one server
faillure, the sites are switch to the other (not really satisfying) ...
site group 1 : regular : server 1 backup : server 2
site group 2 : regular : server 2 backup : server 1
To extend the IPVS scheduler API, wouldn't it be more interesting to
pass the entire
connection description, like in KTCPVS, so that you have the whole
information, to rebuild
the packets, spoofing the server connection source IP with the original
client source IP ?
I noticed that IPVS doesn't contain a regular/backup scheduler, then I
built one
a few months ago... It's called rb ;-)
Is there a way to do that with the wrr or rr schedulers ? ... I didn't
find how...
Sebastien
|