Forum Discussion

Gigi_32681's avatar
Icon for Nimbostratus rankNimbostratus
Dec 31, 2010

Session table share across 2 virtual servers

I have 2 virtual servers, vs_1 has an irule to save the information to the session table, vs_2 will read the information for vs_1's session table.



As I know session table can be used globally, anyone know how to let vs_2 get information from the vs_1's session table????




Thx a lot~~


2 Replies

  • because the session table is global, if you have the key, you can reference it from any virtual. Beginning v10.1, you can use the sharedvar (Click Here) command in vip-targeting-vip scenarios to share data.
  • Thanks for pointing out sharedvar. I hadn't seen that before.



    For pre-10.1, you can use the any virtual key on the session command to share session tables across virtual servers:





    Add a session table entry for $my_key/$my_value with $my_timeout accessible from any virtual server


    session add uie $my_key [list $my_value any virtual] $my_timeout



    Look up a session table entry for $my_key accessible from any virtual server


    session lookup uie [list $my_value any virtual]