Forum Discussion

Mike_Kirkpatric's avatar
Mike_Kirkpatric
Icon for Nimbostratus rankNimbostratus
Jan 08, 2013

Redirect based on number of sessions

I am trying to determine if there is a way to do a redirect based upon the number of current sessions on each of the web hosts. So, we have 3 web hosts and through load testing it has been determined each will handle 2000 sessions (may be higher or lower...I don't know as the testing is currently underway). So if the servers are extremely busy then do a redirect to like:

 

http://www.abc.com/busy.html

 

 

Which that page would have something on it like we are experiencing unusually high volume at this time please try later.

 

 

I currently have two Virtual Servers (http, https) and then two pools that are load balancing between three nodes.

 

 

Thanks

 

Mike

 

3 Replies

  • just wondering if setting connection limit on pool member and using HTTP::redirect or HTTP::respond in LB_FAILED event is acceptable.

     

     

    LB_FAILED Wiki

     

    https://devcentral.f5.com/wiki/iRules.LB_FAILED.ashx

     

     

    sol8457: Connection limits configured on pool members or nodes within a Clustered Multi-Processing configuration are incorrectly enforced per TMM instance

     

    http://support.f5.com/kb/en-us/solutions/public/8000/400/sol8457.html
  • if not, you may review this article.

     

     

    CodeShare Refresh: HTTP Session Limit by Colin

     

    https://devcentral.f5.com/tech-tips/articles/codeshare-refresh-http-session-limit

     

     

    hope this helps.
  • Arie's avatar
    Arie
    Icon for Altostratus rankAltostratus

    You could use Priority Groups in your pool that are activated based on the connection limits of the pool members.

     

    However, rather than sending users to another web server instance with the "sorry we're too busy" message I'd consider sending the entire sorry page in a HTTP::respond:

     

    HTTP::respond 503 content $error_page