Forum Discussion

Sam_Hall's avatar
Sam_Hall
Icon for Nimbostratus rankNimbostratus
Aug 27, 2013

Sessions and the "table" command

In looking for a way to pass information about the HTTP_REQUEST to the HTTP_RESPONSE, I found this interesting iRule... https://devcentral.f5.com/wiki/iRules.HTTPSessionWatcher.ashx

 

First of all, this thing is awesome... F5 rocks!

 

I gather that "table" can be used to store and retrieve sets of key/value pairs for a session. I actually just want to store/retrieve a single value of a cookie, I'm guessing "table" is overkill and I should try to use "session add" and "session lookup" for this first.

 

Can someone provide some details about the scope of a session? Am I right in assuming it's tied to a single user connecting to a single virtual host? If so, that'll be perfect for what I need.

 

4 Replies

  • I'm guessing "table" is overkill and I should try to use "session add" and "session lookup" for this first.

     

    "table" is a newer command (session is the old one). i strongly suggest you using the table command. you have seen nice table article by Spark, haven't you?

     

    v10.1 - The table Command - The Basics by Spark

     

    https://devcentral.f5.com/articles/v101-the-table-command-the-basics.Uh1utG0-ZQI

     

    • Sam_Hall's avatar
      Sam_Hall
      Icon for Nimbostratus rankNimbostratus
      I find the "session" concept to be a bit misleading as it seems to be more of a global data store. That article cleared up everything for me though, thanks! I shall go fourth and use table.
  • I'm guessing "table" is overkill and I should try to use "session add" and "session lookup" for this first.

     

    "table" is a newer command (session is the old one). i strongly suggest you using the table command. you have seen nice table article by Spark, haven't you?

     

    v10.1 - The table Command - The Basics by Spark

     

    https://devcentral.f5.com/articles/v101-the-table-command-the-basics.Uh1utG0-ZQI

     

    • Sam_Hall's avatar
      Sam_Hall
      Icon for Nimbostratus rankNimbostratus
      I find the "session" concept to be a bit misleading as it seems to be more of a global data store. That article cleared up everything for me though, thanks! I shall go fourth and use table.