Forum Discussion

Nic_Foxton_1199's avatar
Nic_Foxton_1199
Icon for Nimbostratus rankNimbostratus
Mar 26, 2018

Cookie persistence to Static Real servers?

Virtual Server cookie persistence mapping to Static Real Servers.

 

I am attempting to replicate cisco CSS11500 behaviour on the F5. Essentially the CSS parses the server supplied cookie and matches a string in the cookie with a string configured against a specific service. Example configuration is thus; content synergy-vip primarySorryServer SynergySorry add service UKSTHSYN301-Synergy1M1 add service UKSTHSYN301-Synergy1M2 add service UKSTHSYN301-Synergy1M3 add service UKSTHSYN301-Synergy1M4 add service UKSTHSYN302-Synergy2M1 add service UKSTHSYN302-Synergy2M2 add service UKSTHSYN302-Synergy2M3 add service UKSTHSYN302-Synergy2M4 add service UKSTHSYN303-Synergy3M1 add service UKSTHSYN303-Synergy3M2 add service UKSTHSYN303-Synergy3M3 add service UKSTHSYN303-Synergy3M4 add service UKSTHSYN304-Synergy4M1 add service UKSTHSYN304-Synergy4M2 add service UKSTHSYN304-Synergy4M3 add service UKSTHSYN304-Synergy4M4 add service UKSTHSYN305-Synergy5M1 add service UKSTHSYN305-Synergy5M2 add service UKSTHSYN305-Synergy5M3 add service UKSTHSYN305-Synergy5M4 add service UKSTHSYN306-Synergy6M1 add service UKSTHSYN306-Synergy6M2 add service UKSTHSYN306-Synergy6M3 add service UKSTHSYN306-Synergy6M4 vip address 172.17.199.116 redundant-index 4050 port 80 protocol tcp url "/*" string range 1 to 1000 balance aca string prefix "SERVER=" string eos-char ";" advanced-balance cookies add service UKSTHSYN307-Synergy7M1 add service UKSTHSYN307-Synergy7M2 add service UKSTHSYN307-Synergy7M3 add service UKSTHSYN307-Synergy7M4 add service UKSTHSYN308-Synergy8M1 add service UKSTHSYN308-Synergy8M2 add service UKSTHSYN308-Synergy8M3 add service UKSTHSYN308-Synergy8M4 active

 

The string configured against each service matches the SERVER=SynergyM as below service UKSTHSYN306-Synergy6M4 keepalive tcp-close fin port 7007 ip address 172.17.200.132 redundant-index 1322 string Synergy6M4 keepalive uri "/O2Jacada/LBProbe.htm" keepalive type http keepalive frequency 10 active

 

Cookie has and rewrite are not working so i need to look at an iRule which will function as per the original CSS configuration. But obviously i'm quite new to F5's and not familiar with building iRules at all. Looking through DevCentral i find one or two generic iRules but nothing i can really use.

 

Has anyone got pointers of able to help me?

 

1 Reply

  • I would recommend that you try not to replicate the CSS function on a step-by-step basis. The devices have different strengths and you may end up with an highly inefficient design on F5 if you try to replicate the CSS function on the F5.

     

    If your goal is to balance based on incoming cookie, the simplest and best option is to use cookie insert. This will enable F5 to create its own cookie.

     

    If you still want to rely on the cookie provided by server, check out K7392 for universal persistence.