Forum Discussion
raytoles_75680
Nimbostratus
Nov 10, 2009Rewrite for another Virtual Server (Cookies and Sessions)
We have to rewrite some requests to one of our virtual servers (vs1) as a directory on another virtual server (vs2). We use the ProxyPass iRule to conduct the rewrite. We're experiencing a problem were during the request session the client is receiving a two cookies from vs2 (BigIpServervs2), one for the rewrite and another for a request through the f5 vip. If the contents of the BigIpServervs2 cookie are different we experience problems with identity management and eCommerce sessions. Any suggestions on how we can make sure this cookie is the same?
- hoolio
Cirrostratus
Hi, - raytoles_75680
Nimbostratus
The goal is to have the BigIpServervs2 cookie to be the same when the user make there request to vs1 (www.site.com). If the user navigates to www.site1.com/core, the request is re-written as www.site2.com/core; at this point they get a BigIpServervs2 cookie. During this session when the user attempts to login or make a purchase, a request is made for vs2 (www.site2.com), the user receives another BigIpServervs2 cookie at this point. If the contents of the BigIpServervs2 cookie is the same we're all good. If not, we have problems with logins and purchases. The BigIPServervs2 is a cookie insert (vanilla default cookie on BigIp 6400). I'll post a diagram as well. - hoolio
Cirrostratus
Aren't the two BigIpServervs2 cookies being set because both VIPs reference the same pool and use the same cookie insert persistence profile? If so, the cookie should be valid regardless. If they are separate pools, you could create a custom cookie insert persistence profile and name the cookie something different for one of the VIPs. - raytoles_75680
Nimbostratus
I'm attaching a logical diagram for the session. - hoolio
Cirrostratus
Thanks. The diagram clears some things up. - raytoles_75680
Nimbostratus
Gotcha on the "one thing". Pool1 and Pool2 are not related different ips, different servers. For the application to maintain the session the BigIpServervs2 cookie must have the same content (I'm told by the developer, I'm still getting information)? The client is receiving two BigIpservervs2 cookies; one from the request to vs2 and one from the rewrite to pool2. The re-write is done via the ProxyPass iRule. The old one not v10. - hoolio
Cirrostratus
Are the BigIpServervs1 and BigIpServervs2 cookies from cookie insert persistence profiles? If it is cookie insert persistence you're using, it's a bit tricky trying to depend on it for persisting clients who have made a request to VS2, created a session on that app and then made a request to VS1's /apa_core URI and been sent to pool2. LTM wouldn't have any idea that the client needs to be persisted to the same pool2 member as the client won't send the persistence cookie from VS2 to VS1. - raytoles_75680
Nimbostratus
We're using the default "cookie" for persistence for all of our virtual servers. I think we might have to look into the quick fix you mentioned. However, we have use a rewrite instead of a redirect. With a redirect we'll have to introduce another Jboss server to support the vs1 domain. - raytoles_75680
Nimbostratus
Are we able to use the proxypass irule to rewrite to VS2? i.e. indicate /apa_core www.site2.com/apa pool2 as the datagroup string. Or do we need to write another irule to conduct this rewrite? - raytoles_75680
Nimbostratus
I'm researching here, and it looks like a Destination address affinity persistence or Source address affinity persistence profile will resolve our problem. This way when the rewrite happens to vs2 the user is sent to the same pool member? The vs2 virtual servers contains Jboss pool members, I'm hoping the use of sticky sessions would not screw up any dynamic requests.
Recent Discussions
Related Content
DevCentral Quicklinks
* Getting Started on DevCentral
* Community Guidelines
* Community Terms of Use / EULA
* Community Ranking Explained
* Community Resources
* Contact the DevCentral Team
* Update MFA on account.f5.com
Discover DevCentral Connects