Edge for Private Cloud v. 4.16.09
The Router makes a health check to the Message Processor every five seconds to determine if the Message Processor is able to service requests. If a Message Processor goes down, the Router automatically forwards requests to another Message Processor.
You can configure how the Router reacts when the Message Processor goes down by setting the conf_load_balancing_load.balancing.driver.nginx.server.retry property on the Router. That property takes a space-delimited set of values that can include:
- off: Disable retry, the Router returns a failure code upon a request.
- http_599: (Default) If the
Router receives an HTTP 599 response from the Message Processor, the Router forwards the
request to the next Message Processor.
HTTP 599 is a special response code that is generated by a Message Processor when it is being shutdown. The Message Processor tries to complete all existing requests, but for any new requests it responds with HTTP 599 to signal to the Router to retry the request on the next Message Processor. - error: If an error occurred while establishing a connection with the Message Processor, passing a request to it, or reading the response header from it, the Router forwards the request to the next Message Processor.
- timeout: If a timeout occurs while establishing a connection with the Message Processor, passing a request to it, or reading the response header from it, the Router forwards the request to the next Message Processor.
- invalid_header: If the Message Processor returned an empty or invalid response, the Router forwards the request to the next Message Processor.
- http_XXX: If the Message Processor returned a response with HTTP code XXX, the Router forwards the request to the next Message Processor.
To configure the Router:
- Edit the /<inst_root>/apigee/customer/application/router.properties file (if the file does not exist, create it).
- Add the conf_load_balancing_load.balancing.driver.nginx.server.retry
property as shown below:
conf_load_balancing_load.balancing.driver.nginx.server.retry=http_599 error - Restart the Router:
> /<inst_root>/apigee/apigee-service/bin/apigee-service edge-router restart