App switching and cookie persistency

Posted by jmaddox question from a customer. Aflex is likely not needed here: The domain is www.domain.comhttp://www.domain.com with a URI of www.domain.com/sfhttp://www.domain/sf, www.in-drive.com/sf-registerhttp://w...com/sf-register, etc… I have 2 Service Groups: Service Group 1: Windows Server 1 Windows Server 2 Service Group 2: RedHat Server 1 RedHat Server 2 Now, per documentation I know that Persistency rules are processed before Aflex. Per the VIP/port I can assign one Cookie Template. So my problem is if a user goes to www.in-drive.com/http://www.in-drive.com/ the cookie persistency is assigned to a Windows Server in Service Group 1. If the user then goes to www.in-drive.com/sfhttp://www.domain.com/sf the cookie persistency will point them to a windows server instead of one of the RedHat Servers in Service Group 2. Vice versa if they went to www.domain.com/sfhttp://www.domain.com/sf first. Right now, as long as the user goes to www.in-drive.com/sf*http://www.in-drive.com/sf* and stays within this base URI, there is no problem same as www.in-drive.com/*http://www.domain.com/* So is it possible to assign Cookie Persistency with name “indrive” if they go to pool or Service Group 1 and assign Cookie Persistency with name “indrivesf” if they go to pool or Service Group 2? Ultimately, I would have to use AFLEX to match URI and Cookie to send them back to the servers they are looking for Please note: My ideal solution is when www.in-drive.com/sfhttp://www.domain.com/sf comes into the LB, I would like to forward this to sf.in-drive.com<domain.com> (does not exist) that would allow me to create a new VIP/port groups and persistency here would not be a problem. However, due to “cosmetic” issues, the business unit wants to see if the above solution is at all feasible.

Posted by ddesmidt aFleX gives you a lot of flexibility and power. But actually you don’t need an aFleX here. Our built-in Cookie Template can reply to your need: . Go to Service Group “SG2” if the request in “/sf” and keep persistence there . Go to Service Group “SG1” if the request in “anything else” and keep persistence there For that use the Cookie persistence template:

Code:




slb template http test_http url-switching starts-with /sg service-group SG2 ! slb template persist cookie test_cookie match-type service-group ! slb virtual-server googletest 1.1.1.1 port 80 http service-group SG1 template persist cookie test_cookie template http test_http !



Dimitri