Forum Discussion

farache_28983's avatar
farache_28983
Icon for Nimbostratus rankNimbostratus
Mar 04, 2014

Irule for Cookie persistence on pool

HI all, I have written an Irule as follow:

Select different persistence methods by HTTP URI

when HTTP_REQUEST {

Check the requested URI switch -glob [HTTP::uri] { "/cares/" - "/fraud/" - "/submit/*" - "/exchange/" - "/webauth/" { Request was for an Sticky URI so select the pool and unset persistence persist cookie insert CSWEB-STICK pool CSWEB-STICK

  }
  default {
      Request was for an NON sticky URI so select the pool and persist with default persistance profile
     persist none
     pool CSWEB-NSTICK
  }

} }

The problem is that on the selection of the pool that should stick with a cookie persistence, it is not working. In the logs I see the following Mar 4 10:55:23 ASH1-PROD3900-01 info tmm[11443]: Rule /Common/Persistence-logger : Request from client: 172.21.81.144:57111 contains no persistence cookie on vip /Common/CSWEB-PERSISTENCE-TEST; request was assigned to pool /Common/CSWEB-NSTICK and member 10.10.97.27:443 Mar 4 10:55:32 ASH1-PROD3900-01 info tmm[11443]: Rule /Common/Persistence-logger : Request from client: 172.21.81.144:57111 contains no persistence cookie on vip /Common/CSWEB-PERSISTENCE-TEST; request was assigned to pool /Common/CSWEB-NSTICK and member 10.12.34.107:443 Mar 4 10:55:32 ASH1-PROD3900-01 info tmm[11443]: Rule /Common/Persistence-logger : Request from client: 172.21.81.144:57111 contains no persistence cookie on vip /Common/CSWEB-PERSISTENCE-TEST; request was assigned to pool /Common/CSWEB-NSTICK and member 10.12.34.108:443

AS you can see the connections bounces from one node to the other since it cannot find a "cookie" . It is assigning the default pool which has a persist none before calling it.

Is there something i might be doing wrong? it looks like the F5 is NOT inserting the cookie properly or at all...

any help is appreciated

  • Christian_30338's avatar
    Christian_30338
    Historic F5 Account

    Hello, can you please confirm whether the OneConnect feature is enabled on the Virtual Server or not?

     

    Also what do you see from the client machine? Do you see the persistence cookie coming through correctly after connecting to the Sticky Pool?