Forum Discussion
Oz_Ayd_69699
Nimbostratus
Jun 30, 2006HTTP:retry Web Service problem
Problem 1. The following HTTP:retry example (from the iRules documentation) does not work (LTM version 9.2.3). The LB::reselect is not allowed in a HTTP_RESPONSE. Is this correct? How would you overcome this restriction.
when CLIENT_ACCEPTED {
set i 0
}
when HTTP_REQUEST {
log "Request [HTTP::request_num]"
set request [HTTP::request]
}
when HTTP_RESPONSE {
log "Response [HTTP::request_num]"
if {[HTTP::status] == 404}{
if {[incr i] < 3} {
LB::reselect
HTTP::retry $request
}
} else {
set i 0
}
}
Problem 2. If the request is for a Web Service and a 404 error occurs (assume load balancing is round robin), a 400 Bad Request
error is returned. Does the Web Service request HTTP header need to be altered prior the HTTP:retry? Does HTTP::retry work with Web Services?
2 Replies
- bl0ndie_127134Historic F5 AccountYes you should be able to do this but with one caveat. The HTTP::request rule does not include the HTTP request body so if your request is a POST method, you will have to collect the POST data and append it to the request.
- Oz_Ayd_69699
Nimbostratus
Thanks for the clarification.
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