Forum Discussion
Alain_Demeuse_3
Mar 28, 2019Nimbostratus
how to know on which node my request is load balanced
Hello, in irule, how to know on which node my http request is load balanced? Thanks, Alain
Kai_Wilke
Mar 28, 2019MVP
Hi Alain,
a few techniques which I've used in the past.
1.) Put an individual
/node.txt
file on each of your load balanced web servers. Request this file with your browser session, to see where you're currently load balanced to.
2.) Add an iRule to your VS to virtualize those
/node.txt
requests. Request the given URI with your browser session, to see where you're currently load balanced to.
when HTTP_REQUEST_SEND {
clientside {
if { [HTTP::uri] equals "/node.txt" } then {
HTTP::respond 200 content [IP::server_addr]
}
}
}
3.) Add an iRule to your VS to include a VIA header to every HTTP response and use a HTTP Analyzers (e.g. Fiddler) to read those VIA headers.
when HTTP_RESPONSE {
HTTP::header insert "VIA" "[IP::server_addr]"
}
4.) Combine all together... 😉
Cheers, Kai
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