Forum Discussion
bhorta1_9687
Nov 04, 2011Nimbostratus
Will this irule work okay to "Patch" a messed up web application
I am running version 10.2 and unfortunately there is a little problem with a "Cloud" Application that consists of several front end web servers that talk to a few db servers in the back.Every so ofte...
nitass
Nov 05, 2011Employee
this is mine.
[root@iris:Active] config b virtual bar list
virtual bar {
snat automap
pool foo
destination 172.28.17.33:http
ip protocol tcp
rules myrule
profiles {
http {}
tcp {}
}
}
[root@iris:Active] config b pool foo list
pool foo {
members {
74.125.235.48:http {}
172.28.17.22:http {}
}
}
[root@iris:Active] config b rule myrule list
rule myrule {
when CLIENT_ACCEPTED {
set def_pool [LB::server pool]
set retries 0
}
when HTTP_REQUEST {
set request_headers [HTTP::request]
log local0. "$request_headers"
}
when LB_SELECTED {
log local0. "[LB::server addr]"
}
when HTTP_RESPONSE {
log local0. "[IP::server_addr]:[TCP::server_port] [HTTP::status]"
if {[HTTP::status] starts_with "5"} {
incr retries
log local0. "5xx error caught: retry $retries out of [active_members [LB::server pool]]"
if { $retries < [active_members $def_pool] } {
HTTP::retry $request_headers
}
}
}
}
[root@iris:Active] config curl -I http://172.28.17.22
HTTP/1.0 500 Internal Server Error
Server: BigIP
Connection: Keep-Alive
Content-Length: 0
[root@iris:Active] config curl -I http://172.28.17.33
HTTP/1.1 200 OK
Date: Sat, 05 Nov 2011 01:32:05 GMT
Expires: -1
Cache-Control: private, max-age=0
Content-Type: text/html; charset=ISO-8859-1
Server: gws
X-XSS-Protection: 1; mode=block
X-Frame-Options: SAMEORIGIN
Transfer-Encoding: chunked
[root@iris:Active] config tail -f /var/log/ltm
Nov 5 09:29:22 local/tmm info tmm[1609]: Rule myrule : HEAD / HTTP/1.1 User-Agent: curl/7.15.5 (i686-redhat-linux-gnu) libcurl/7.15.5 OpenSSL/0.9.8b zlib/1.2.3 libidn/0.6.5 Host: 172.28.17.33 Accept: */*
Nov 5 09:29:22 local/tmm info tmm[1609]: Rule myrule : 172.28.17.22
Nov 5 09:29:22 local/tmm info tmm[1609]: Rule myrule : 172.28.17.22:80 500
Nov 5 09:29:22 local/tmm info tmm[1609]: Rule myrule : 5xx error caught: retry 1 out of 2
Nov 5 09:29:22 local/tmm info tmm[1609]: Rule myrule : HEAD / HTTP/1.1 User-Agent: curl/7.15.5 (i686-redhat-linux-gnu) libcurl/7.15.5 OpenSSL/0.9.8b zlib/1.2.3 libidn/0.6.5 Host: 172.28.17.33 Accept: */*
Nov 5 09:29:22 local/tmm info tmm[1609]: Rule myrule : 74.125.235.48
Nov 5 09:29:22 local/tmm info tmm[1609]: Rule myrule : 74.125.235.48:80 200
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