Forum Discussion
Choose pool based on HTTP Response
Is there any way to select a pool based on HTTP response?
For example: the default pool is responding on different URIs with different redirects. I don`t want the client to see that redirect, instead F5 to choose a different pool based on the redirect sent by the default pool. Is that possible?
- Jad_Tabbara__J1Cirrostratus
Hi Ilian,
I don't think it is possible to do it transparently to the client. Because the selection of the pool/pool member can be done in two manner using commands :
1) "pool" - link https://devcentral.f5.com/wiki/irules.pool.ashx
2) "LB::reselect" - link https://devcentral.f5.com/wiki/irules.lb__reselect.ashx
Both commands are not valid for HTTP_Response event.
The "HTTP::retry" command is interesting but you can not choose another pool (or pool member).
- Stanislas_Piro2Cumulonimbus
Hi,
Can you explain what do you expect.
The pool is already selected when the server responds. ;-)
- Martin_RobbinsNimbostratus
I was able to do this by collecting all the headers on each request in HTTP_REQUEST combined with a select pool based on using a flag set in HTTP_RESPONSE, then if a retry was required, set the flag true and calling HTTP::retry with the headers caused the HTTP_REQUEST to select the new pool.
Unfortunately I cannot paste the code but it did work on 11.5 and above.
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