F5 is upgrading its customer support chat feature on My.F5.com. Chat support will be unavailable from 6am-10am PST on 1/20/26. Refer to K000159584 for details.

Forum Discussion

myself_85560's avatar
myself_85560
Icon for Nimbostratus rankNimbostratus
May 31, 2016
Solved

LB decisions matching the headers

Hi, We have a custom written application that is being hosted on multiple servers behind the LTM. It does not use cookies rather a variety of unique http headers. I need to use these unique headers t...
  • Yann_Desmarest_'s avatar
    Jun 01, 2016

    Hi,

    I would recommend the modified irule below, changed second if by elseif. Otherwise, If you match the first if you also match the else and you will have a tcl error and a tcp reset on thz client side :

    when HTTP_REQUEST {
    if { [class match [HTTP::header "online.protocol.remote.contenttype"] equals header_value_1] } {
            pool_1
        }
    elseif { [class match [HTTP::header "online.protocol.remote.contenttype"] equals header_value_2] } {
            pool_2
        } 
        else {
            pool_3
        }
       }