Options

Persistence for http host url

jojo Member
Hello, I am new on the aFlex world, I have created a few rules myselft, but I might need some help on this next rule... basically what I want is to force persistence when visiting a particular site, for example s1.domain.com I want it to go to the same back end where it last was, so I think the aflex rule would look like this:
when HTTP_RESPONSE {
set HOST [HTTP::host]
persist add uie $HOST 1800
}
when HTTP_REQUEST {
set HOST [HTTP::host]
persist uie $HOST
}


any help on this would be appreciated, thanks
Tagged:

Comments

  • Options
    edited February 2014
    Hello
    your syntax is correct. you can also direct the traffic to a particular pool or member if you like below is some additional example

    pool

    Causes the system to load balance traffic to the specified pool or pool member.

    Note: Pool / member may be selected conditionally. If multiple conditions
    match, the last match will determine the pool/member to which this traffic
    is load balanced.
    Example:
    Syntax
    pool
    pool [member [] ]
    pool
    when CLIENT_ACCEPTED {
    if { [IP::addr [IP::client_addr] equals 10.10.10.10] } {
    pool my_pool
    }
    }
Sign In or Register to comment.