Forum Discussion
vinceKahn_97184
Jan 22, 2010Historic F5 Account
CARP Hash Persistence
I couldn't find anything in the docs on how to set this up. I've done what I think is correct but am surprised to see when I refresh a request it hits all three of my proxies.
I've created a Hash Persistence profile with CARP enabled. I created the following iRule and applied it to the new Hash profile.
when HTTP_REQUEST {
persist hash [HTTP::uri]
}
I then added the new persistence profile to my virtual server load balancing my proxies. I tested hitting "http://www.whatismyip.com/". With each refresh I see one of my three proxy IP's. With the older election hash iRule I'd always see only one of the three.
Did I set this up right? Are the results correct?
Thanks,
Vince
6 Replies
- spark_86682Historic F5 AccountWell, your iRule is selecting regular hash persistence, so it won't use the CARP-like algorithm, no. You either need to use "persist carp [HTTP::uri]" if you're on 10.1, or you need to do your text selection entirely through the persistence profile (start/end pattern, or offset/length). For doing it off uri, since HTTP requests look like " ", you could probably do a start and end pattern of a single space, but I haven't tested that.
- vinceKahn_97184Historic F5 AccountThat makes sense but what's the point of selecting "CARP" in the persistence profile? If I'm doing it in the iRule then why have bother with the persistence profile?
- vinceKahn_97184Historic F5 AccountI've done some additional testing and can't account for the results. I removed the persistence profile and created a simple irule:
- vinceKahn_97184Historic F5 AccountFor anyone that's interested I believe this is resolved. A few points made clear by F5 support.
- spark_86682Historic F5 AccountAs for OneConnect, yeah, for multiple requests over the same connection, you'll want that. It's so first-nature to me I never suspect it isn't there.
- spark_86682Historic F5 AccountWow, this was quite the investigation. Long story short, your config will work, and will use the CARP-like algorithm. What's happening is that the iRule is specifying default hash persistence, but your hash profile setting of the CARP-like algorithm is overriding that (the override does not happen in the vice versa case).
when HTTP_REQUEST { persist carp [HTTP::uri] }
Recent Discussions
Related Content
DevCentral Quicklinks
* Getting Started on DevCentral
* Community Guidelines
* Community Terms of Use / EULA
* Community Ranking Explained
* Community Resources
* Contact the DevCentral Team
* Update MFA on account.f5.com
Discover DevCentral Connects