Forum Discussion

fluidbios's avatar
fluidbios
Icon for Nimbostratus rankNimbostratus
May 11, 2021

Cookie/iRule to send Session terminate?

Hey Folks,

 

We discovered that existing sessions to our web application persist when our maintenance page is applied (by applying an iRule). The result is that they can still navigate and play content during a maintenance window.

 

I'm experimenting with the "action on service down" and cronjob activated commands to place the m-page, force offline pool members with one command, bring the pool members back up a minute later but leave the m-page up until completed. This sort of works but only for site navigation. The very next thing that a user will click will force them to the m-page which is fine but 9 times out of 10 a user will be watching video content which is coming from content servers, not the fe/be servers that are in maintenance.

 

Is there something I can do with an iRule that sends a command across existing connections that will tell the client's browser to terminate all their content connections as well?

 

Applying a m-page to our content servers wouldn't work since most people will be hitting Fastly servers.

 

Kind Regards,

Chuck

2 Replies

  • Hamish's avatar
    Hamish
    Icon for Cirrocumulus rankCirrocumulus

    Hmm...

     

    Thinking outside the box a bit.

     

    You could keep a global variable that says whether to continue to service content. Then add an iRUle that triggers events for data received. So you effectively get an event triggered for pretty much every packet. When you get the event,

     

    e.g.

     

    https://clouddocs.f5.com/api/irules/SERVER_DATA.html

     

    When you trigger , check the variable to say whether the service is up or down. if it's down, drop the connection. If it's up, let the data through. you'd need some way to control the global that states of the service is up or down, but apart from that and some minor concerns about scalability, it should work...

     

    H

  • Better use the table command to share values between irules on the different VIP for the different servers:

     

     

    https://support.f5.com/csp/article/K13033