Forum Discussion
Jonas_Karlsson1
Mar 02, 2005Historic F5 Account
Help with persist command
I need some help with the persist command. It's been a long day so I'm probably not thinking straight anymore.
I have an IP address and a string and when I find the same string in another HTTP request I want to send that to the IP address I have.
Could someone please point me in the right direction?
Thanks!
3 Replies
- unRuleY_95363Historic F5 AccountAre you asking to persist on both the IP address and the string together?
If so, simply use UIE persistence and concatenate the two together like so:rule my_uie { when HTTP_REQUEST { persist uie [concat [IP::remote_addr] [HTTP::header "MyHeader"]] } } - Jonas_Karlsson1Historic F5 AccountI should probably have explained a bit more in depth what I'm trying to do.
I have two pools of serves. Server A in one pool does a POST to the other pool. The reply (from server B), will contain a unique identifier. Later on server B will post a message back saying that it is done with processing the message. I want that (based on the same unique identifier), to persist back to server A. It's a bit backwards... - unRuleY_95363Historic F5 AccountOk, this is an excellent example for using the session cmd.
First, you will want to extract the unique Identifier and on the first request do a "session add uie $unique_id [IP::client_addr]" to save the original host that was used.
Then when the successive posts comes in, you'll want to extract the unique identifier, look it up in the session table with "session lookup uie $unique_id" and if it contains a value, use that host with either the "pool member " or the "node " command.
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)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
