I would like to write a static scheduler which would not use the
connection hash table and instead, upon each packet arrival for a
virtual server, generate a hash number given the source IP and map the
client to one of the real servers.
I hope people would accept this into cvs?
This would require some changing beyond the scheduler to accomodate
this. For example, we could change tcp_conn_schedule() so it always, in
the case of this being a "static" scheduler, calls the scheduler even if
the packet is not a SYN packet. So we could then add the notion of flags
to the schedulers and set the flag STATIC (0x1) for this service. That
way, we would check in tcp_conn_schedule if the flag for the service has
the STATIC flag set, if so we will always call the
scheduler(ip_vs_schedule()).
The downside to this is of course no DDOS checks, but this could be
offloaded in the realservers. At any rate, it would provide an
interesting alternative and benchmarks might just shoot throug the roof.
Another downside is the static nature of it, there is no dynamic load
balancing. But I would envision using weights such that we have 1 bucket
per weight and hash to that. Say we have 2 real servers, and we set one
to weight of 1, the other to weight of 2. That way, we create 3 buckets,
the first for real server 1, the next to for real server 2. We then
hash to one of the 3 buckets and choose that real server. When a real
server goes down we could then have its buckets "forward" to the other
real servers.
Thanks for any comments.
|