Forum Discussion
HTTP Redirect persistence logic
Hello!
1) The client comes into the first VIP (SSL offload) and picks a MEM-ID server. Let's say MEM-ID-SRV01. It then talks to Service-SRV-01. The client wants all future connections to stay in the same color servers. (The connections to the back end service srv's are a direct connection (not through the LB).
2) MEM-ID-SRV01 will send a redirect back to the client to go to the other VIP(SSL offload). But the requirement is that the request will go to OLB-SRV-01 in this case.
Is it best to have the MEM-ID-SRV01 send a specific header or append a unique HTTP path to the redirect back to the client? Then have the 2nd VIP have irule logic to send it to the specific server, or is there a way to create a hash value on the F5 during the initial LB selection and make sure that hash value gets appended to the MEM-ID-SRV redirect back to the client. (This 2nd option would prevent work done on the MEM-ID Servers)
Thanks!
- Leonardo_SouzaCirrocumulus
I guess this is what you are looking for:
https://support.f5.com/csp/article/K5837
You enable persistence and then match across virtual servers for example.
Here is what I ended up with if it helps anyone else:
v11.6.0 when CLIENT_ACCEPTED { set retries 0 } when LB_FAILED { set number of desired retries to selected node below if { $retries < 1 } { persist none LB::mode rr LB::reselect pool A-TS-OLB-DMZ-443-POOL incr retries } log local0. "Sending HTTP query [HTTP::query] to node [LB::server]" } when HTTP_REQUEST { switch -glob [string tolower [HTTP::query]] { "memid=1" { node 192.168.112.141 } "memid=2" { node 192.168.112.142 } "memid=3" { node 192.168.112.143 } "memid=4" { node 192.168.112.144 } "memid=5" { node 192.168.112.145 } default { pool A-TS-OLB-DMZ-443-POOL } } log local0. "Sending HTTP query [HTTP::query] to node [LB::server addr]" }
Recent Discussions
Related Content
* 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