Forum Discussion

Richard_77286's avatar
Richard_77286
Icon for Nimbostratus rankNimbostratus
Nov 18, 2013

iRule to rebind session(s) from failed member server to another server in a pool based on http error code(s)

Has anyone created an iRule for this?

 

We have 2 servers in a pool using round robin. If a service on that server fails or returns an error code, we want the session(s) on that server to rebind to the available member server.

 

Any info is appreciated.

 

5 Replies

  • Kevin, I edited the HTTP_RESPONSE below and did not get an error when I applied it. Will the rule work if the status starts with either "5" or "4"? Or will I have to create two separate iRule for each status? Please advise. Thanks!

     

    when HTTP_RESPONSE { 28 Check for server errors 29 if { [HTTP::status] starts_with "5" or "4" } {

     

  • Your conditional would look something like this:

    if { ( [HTTP::status] starts_with "4" ) or ( [HTTP::status] starts_with "5" ) }