I want to try KTCPVS as a load balancer with sticky session (cookie) support.
Well, I was theoretically thinking on this and I don't see how this
problem is solved:
I use LVS-DR. So packets go to Director, are forwarded to Realserver, and
then go direct to outside router.
If cookie management is at director level, and packets go in one-way only,
then:
1 - Client send request {req}. Request has no cookie attached.
2 - Director sees no cookie, forwards to RS1
3 - RS1 gives cookie COOKIE1
4 - Packet goes out with {COOKIE1, reply}
5 - Client send new request {COOKIE1, newReq}
6 - Director sees COOKIE1, but has no mapping information of it ?!?
This doesn't seems to be a problem specific to KTCPVS, but to all
arquitectures who do not use a "two-way" balancer.
Maybe the solution is completely different, and the balancer itself
inserts the control cookie?
You'ld have
1 -
2 - Director sees no cookie, forwards to RS1 as {DIR_COOKIE1, req}
3
4 - Packet goes out with {DIR_COOKIE1, COOKIE1, reply}
...
Is this the racionale behind KTCPVS phttp behaviour?
Thank you
Joao Clemente
|