Request retry if back-end server response times out
How request retry works when back-end server response times out
-
The process starts by enabling appqoe feature on your appliance.
-
The appqoe configuration has “retryOnTimeout” parameter in milliseconds.
-
When the appliance sends a request and if the server takes more time to respond, the appliance performs re-load balancing based on the configured timeout value. The appliance resets the connection, chooses another service and forwards the request instead of waiting for the server response.
-
After the load balancing virtual server receives the response, the appliance forwards the response to the client. The usage of a time out parameter prevents the appliance to keep waiting for server response leading to an increased RTT.
-
If the available back-end servers is equal or lesser than the retry count and if all the servers times out for the request , the appliance would respond a 500 internal server error. Consider a scenario with five available servers and the retry count set as six. If all the five servers times out for the request, then the appliance returns a 500 internal server error to the client.
-
Similarly if the number of backend servers is more than the retry count and if the back-end server times out upon a request, the appliance keeps waiting upon the last service until the server sends out a response or client idle connection times out. Consider a scenario with three back-end servers and the retry count set as two. If all the three servers times out upon the request, the appliance keeps waiting upon the third service until the server sends out a response or client idle connection times out.
Configure request retry (GET and POST method) when back-end server response times out
-
Enable appqoe
-
Configure appqoe action
-
Add appqoe policy
-
Bind appqoe policy to load balancing virtual server
Enable appqoe
enable ns feature appqoe
Add appqoe action for timeout
add appqoe action <name> -retryOnTimeout <msecs> -numRetries <positive_integer>
add appqoe action appact1 -retryOnTimeout 35 –numRetries 5
Add appqoe policy
add appqoe policy <name> -rule <rule> -action <name>
add appqoe policy timeout_policy -rule http.req.method.eq(get) -action appact1
Bind appqoe policy to load balancing virtual server
bind lb vserver <name> ((<serviceName> (-policyName <string> [-priority <positive_integer>] [-gotoPriorityExpression <expression>] [-type ( REQUEST | RESPONSE )]
bind lb vserver v1 -policyName timeout_policy -type REQUEST -priority 1
Configure AppQoE policy for re-loadbalancing on timeout by using the NetScaler GUI
-
Navigate to AppExpert > AppQoE > Policies.
-
In the AppQoE Policies page, click Add.
-
In the Create an AppQoE Policy page, set the following parameters:a. Name. AppQoE policy name b. Action. Add or edit an action. To create a new action, see Create AppQoE Action section. c. Expression. Select or enter “http.req.method.eq(get)” policy expression.
-
Click Create and Close.
Configure AppQoE action for request retry by using the NetScaler GUI
-
Navigate to AppExpert > AppQoE > Action.
-
In the AppQoE Actions page, click Add.
-
In the Create AppQoE Action page, set the following parameter for retry on back-end server response time out: a. Retry on Timeout. Retry on request timeout (in millisec) upon sending request to backend servers.
-
Click Create and Close.