Forum Discussion

adiezma_1656's avatar
Icon for Nimbostratus rankNimbostratus
Jun 15, 2012

Hash CARP: uri or path



Question 1: Our customers use a virtual server (VS) of web proxy. This virtual server is associated to a pool with four proxies. CARP is configured on the VS profile. I´ve just configured CARP using hash for URI, but it appears the following error: when customers access web form pages, the form page process doesn´t work properly, and can´t be completed ( However, If CARP is disabled and activating source address persistence, it works !!!!.).


I configured the irule containing the string "persist hash [HTTP::uri". I really wonder if changing hashing to "persist hash [HTTP::path" would be more suitable than hashing by URI…..What´s your opinion? I strongly appreciate it… J .


Question 2: I have other doubt…. Excuse me but, what´s the difference between "persist hash [HTTP::path" and "persist hash [HTTP::host"? Which hashing mechanism of them do you consider would be better for our deployment?.






1 Reply

  • Hi Antonio,

    You could use [HTTP::path] or maybe it would be more ideal to parse the domain of the host instead so that all requests for go to the same proxy. You could also handle IP addresses in the host header and requests without a host header value:

     Check if Host header is present and not an IP address
    if {[string match -nocase {*[a-z]*} [HTTP::host]]}{
        Persist on the last two fields of the domain
       persist hash [domain [HTTP::host] 2]
    } elseif {[HTTP::host] ne ""}{
        Host header value is an IP
       persist hash [HTTP::host]
    } else {
        Host header value is blank so persist on the path
       persist hash [HTTP::path]