If everyone is thinking the same, someone isn't thinking

Lori MacVittie

Subscribe to Lori MacVittie: eMailAlertsEmail Alerts
Get Lori MacVittie via: homepageHomepage mobileMobile rssRSS facebookFacebook twitterTwitter linkedinLinkedIn

Related Topics: Change Leadership Journal, Married to Chocolate

Blog Feed Post

Cookie Persistence and Troubleshooting

The BIG-IP persistence cookie is a valuable configuration option that allows stateful applications to remain persistent to a specific node with no additional configurations within the application or on the server(s) by doing something like clustering.

I hear application development teams refer to this as “sticky session” or “stick sessions”, but in reality this cookie has nothing to do with a user’s “application” session, but has everything to do with the user’s session persistence to the same server that the application session was started on.

After reading an F5 Solution article (SOL6917: Overview of BIG-IP persistence cookie encoding) and learning that the information encoded within a BIG-IP Cookie could be useful I decided to make a tool that could decipher this information quickly so that I could use it for troubleshooting.

What is useful in a BIG-IP Cookie?

The BIG-IP Cookie contains the IP Address of the server that the client is being persisted to, as well as the server port that the connection is being established on.

So? Why is this useful? I could get that information from an iRule…

True, you can get this information logged within the LB::selected event within an iRule, but that requires you to make an iRule change to gather the information that you actually already have (unless you are encrypting your BIG-IP Cookies which negate the usefulness of this tool). Most changes in Production require change management approval, which you get to bypass when using this tool if cookie persistence is configured.

There are many tools that you can use to capture the persistence cookie being provided by the BIG-IP. I commonly use Fiddler2 (http://www.fiddler2.com/fiddler2/)…




This is the application that I created to decipher the BIG-IP Cookies.




The tool is semi-intelligent for the input. It can take any of the following and give the correct output:


Paste the cookie into the tool and select ‘Auto-Parse’ option:




This will populate the Conversion Area:




Then select the ‘Decipher’ option:




This becomes useful for troubleshooting purposes to determine which server you are persisted to when you are trying to determine which member server is or is not having an issue.

As you can see, this correctly identified which server I was communicating with in this pool of servers:




I hope that everyone finds this tool useful.

If you find any issues or have any questions please feel free to contact me on DevCentral.

Source Code

The full source for this application can be retrieved at this link: CookietoolRelease.zip

Read the original blog entry...

More Stories By Lori MacVittie

Lori MacVittie is responsible for education and evangelism of application services available across F5’s entire product suite. Her role includes authorship of technical materials and participation in a number of community-based forums and industry standards organizations, among other efforts. MacVittie has extensive programming experience as an application architect, as well as network and systems development and administration expertise. Prior to joining F5, MacVittie was an award-winning Senior Technology Editor at Network Computing Magazine, where she conducted product research and evaluation focused on integration with application and network architectures, and authored articles on a variety of topics aimed at IT professionals. Her most recent area of focus included SOA-related products and architectures. She holds a B.S. in Information and Computing Science from the University of Wisconsin at Green Bay, and an M.S. in Computer Science from Nova Southeastern University.