Forum Discussion
Session persistence based on http header for machine to machine calls
- Dec 16, 2022
Awesome!
Thank-you very much for your help!
Hi Mcris,
based on your answers i would like to recommend CARP.
CARP based distribution is a load balancing method which distributes load based on a given "INPUT" value that a transaction carries with. If all you requests are getting tagged by the API GW, then you could use the tag as input for load-balaing decission.
when HTTP_REQUEST {
if { [HTTP::header value "API-GW-Tag"] ne "" } then {
persist carp [HTTP::header value "API-GW-Tag"]
} elseif { [HTTP::cookie value "API-GW-Tag"] ne "" } then {
persist carp [HTTP::cookie value "API-GW-Tag"]
} else {
persist none
}
}
Benefits of this method is simplificy, a good balacing of independent Tags (the more unique tags the better the balacing will be) and a guaranteed binding of a given Tag value to one Pool member. Using CARP your F5 dont need to track anything in Memory which may time out...
You may additionally enable OneConnect in combination with CARP. It will slightly boost the performance of your non Keep-Alive sessions (backend connection to the API will be pooled) and also allowes CARP to work in combination with Keep-Alive sessions (true per request balancing).
Cheers, Kai
Awesome!
Thank-you very much for your help!
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