Forum Discussion

third_eye_13875's avatar
third_eye_13875
Icon for Nimbostratus rankNimbostratus
Dec 03, 2013

Display a "We are overloaded page"

Hi, I would like to display a nice "We are overloaded page" when we are under a high load. In the pool which I am referring to we have a number of "worker" servers and one failover server with a lower priority. So if all "worker" servers are not available (maybe because of failed availability check) then a failover page gets displayed from the failover node. Now I am thinking of putting a "max connection" limit on each "worker" server and if all of them reached that max connection number I want to display a "We are overloaded page" (hosted on another server). Is there a way to distinguish the worker status between "overloaded" and "not available at all"? It would be cool to have something like a function which shows the current amount of connections to a particular "worker" server or all of them in a pool.

 

Thanks for any ideas...

 

8 Replies

  • Hi.

    Firstly you don't need your failover server, you can do that with a HTTP profile. There's "Fallback Host" in it, and when all pool members are unavailable it will send the request to this host (your failover server).

    Regarding the difference between "all pool members unavailable" and "overloaded", LTM makes the difference.

    You will have a red diamond if all members are down, and a yellow triangle if the connection limit is reached. If the connection limit is reached, the BIG-IP will send a TCP RST.

    To avoid that you have to use your own iRule to make a connection limit :

    when RULE_INIT {
          set ::max_connections 100
          set static ::active_connections 0
    }
    when HTTP_REQUEST {
        if {$::active_connections > $::max_connections} then {
                HTTP::redirect "Your_newest_URL"
                TCP::close
                incr ::active_connections 1
        }
    }
    when CLIENT_CLOSED {
          incr ::active_connections -1 
    }
    
    • third_eye_13875's avatar
      third_eye_13875
      Icon for Nimbostratus rankNimbostratus
      Hi, thanks for the response. What worries me a bit is "If the connection limit is reached, the BIG-IP will send a TCP RST". I thought that when I set a conneciton limit on a pool node base (not VIP base) then the BIG-IP will try to connect to the next available pool node (of the same priority). So it does always send a TCP RST? The problem with the counting of current connections in the iRule is that the amount of our "worker" nodes can change all the time (virtual ones) and for changing an iRule (to change the amount of max connections) I need to create a ticket in our datacenter (which could take some time worst case).
  • Hi.

    Firstly you don't need your failover server, you can do that with a HTTP profile. There's "Fallback Host" in it, and when all pool members are unavailable it will send the request to this host (your failover server).

    Regarding the difference between "all pool members unavailable" and "overloaded", LTM makes the difference.

    You will have a red diamond if all members are down, and a yellow triangle if the connection limit is reached. If the connection limit is reached, the BIG-IP will send a TCP RST.

    To avoid that you have to use your own iRule to make a connection limit :

    when RULE_INIT {
          set ::max_connections 100
          set static ::active_connections 0
    }
    when HTTP_REQUEST {
        if {$::active_connections > $::max_connections} then {
                HTTP::redirect "Your_newest_URL"
                TCP::close
                incr ::active_connections 1
        }
    }
    when CLIENT_CLOSED {
          incr ::active_connections -1 
    }
    
    • third_eye_13875's avatar
      third_eye_13875
      Icon for Nimbostratus rankNimbostratus
      Hi, thanks for the response. What worries me a bit is "If the connection limit is reached, the BIG-IP will send a TCP RST". I thought that when I set a conneciton limit on a pool node base (not VIP base) then the BIG-IP will try to connect to the next available pool node (of the same priority). So it does always send a TCP RST? The problem with the counting of current connections in the iRule is that the amount of our "worker" nodes can change all the time (virtual ones) and for changing an iRule (to change the amount of max connections) I need to create a ticket in our datacenter (which could take some time worst case).
  • If connection limit is reached on only one node, it will try to connect to the next available member.

     

  • If connection limit is reached on only one node, it will try to connect to the next available member.