Forum Discussion

liujack88_28832's avatar
liujack88_28832
Icon for Nimbostratus rankNimbostratus
Jun 15, 2017

How Source Address Affinity works together with CARP?

How Source Address Affinity works together with CARP? There is a Hash Algorithm option when you configure a persistence profile. when should we select CARP? why CARP is an excellent choice for load balancing a pool of HTTP cache proxies?

 

5 Replies

  • Hashing is both a load-balancing method and a persistence method.

     

    A hash based on path/uri is the most efficient method of load-balancing (and persisting) between cache proxies as it maximises the chances of a cache hit. This is because caches always include path/uri in their Universal Caching Identifier (UCI), so by using a uri hash you can guarantee (unless it's the first request or cache evictions) that the object will be in cache (whether fresh or marked expired).

     

    Maximising cache hits on the cache, minimises hits on the backend servers by having everything either returned from cache or else revalidated via a conditional request. It's best for the client and the backend servers - win/win!

     

    CARP in conjunction with a hash persistence profile gives you this.

     

    When used with source address persistence, it simply means that for a given client IP, all requests will be sent to the same pool member.

     

    • liujack88_28832's avatar
      liujack88_28832
      Icon for Nimbostratus rankNimbostratus

      Thank you for your detail explanation. But I still have some questions. For example, ratio load-balancing is selected for pool member and source address persistence with CARP is selected. Client sends first http request to VS, in my understanding, pool member(caching proxy) will be selected based on assigned ratio. All subsequent requests from the same client will be sent to the same pool member. How does CARP impact the process of pool member selection and session persistence? what is the difference between CARP enabled and disabled?

       

  • I think that the 'source address persistence with CARP' will override the ratio setting ie. you won't get any ratio loading. If you want ratio loading and source IP persistence, remove the CARP setting from your source ip peresistence profile. Test this - I may be wrong :-).

     

  • When enabling "Source Address Affinity" together with "CARP" does it mean that the bigip uses both the Source IP and the HTTP uri to caclculate the hash and choose which pool member will be selected ?