ADC

Request retry if back-end server response times out

Request retry is available for one more scenario where, if a back-end server takes more time to respond to requests, the appliance performs re-load balancing upon timeout and forwards the request to the next available server.

How request retry works when back-end server response times out

The following diagram show the components interact with each other:

How request retry works when back-end server response times out

  1. The process starts by enabling appqoe feature on your appliance.
  2. The appqoe configuration has “retryOnTimeout” parameter in milliseconds.
  3. 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.
  4. 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.
  5. 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.
  6. 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

For configuring request retry for GET method on timeout, you must complete the following steps.

  1. Enable appqoe
  2. Configure appqoe action
  3. Add appqoe policy
  4. Bind appqoe policy to load balancing virtual server

Note:

The request retry upon timeout scenario is also applicable for POST method.

Enable appqoe

At the command prompt, type:

enable ns feature appqoe

Add appqoe action for timeout

You must configure the appqoe action to retry on timeout and define the number of retry attempts.

At the command prompt, type:

add appqoe action <name> -retryOnTimeout <msecs> -numRetries <positive_integer>

Example:

add appqoe action appact1 -retryOnTimeout 35 –numRetries 5

Add appqoe policy

To implement appqoe you must configure appqoe policy to define how to queue the connections.

At the command prompt, type:

add appqoe policy <name> -rule <rule> -action <name>

Example:

add appqoe policy timeout_policy -rule http.req.method.eq(get) -action appact1

Bind appqoe policy to load balancing virtual server

When a back-end server takes a long time to respond and if you want the load balancing virtual server to forward the request to the next available service, you must bind the appqoe policy to balancing virtual server.

At the command prompt, type:

bind lb vserver <name> ((<serviceName> (-policyName <string> [-priority <positive_integer>] [-gotoPriorityExpression <expression>] [-type ( REQUEST | RESPONSE )]

Example:

bind lb vserver v1 -policyName timeout_policy -type REQUEST -priority 1

Configure AppQoE policy for re-loadbalancing on timeout by using the NetScaler GUI

  1. Navigate to AppExpert > AppQoE > Policies.
  2. In the AppQoE Policies page, click Add.
  3. 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.

  4. Click Create and Close.

Configure AppQoE action for request retry by using the NetScaler GUI

  1. Navigate to AppExpert > AppQoE > Action.
  2. In the AppQoE Actions page, click Add.
  3. 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.
  4. Click Create and Close.
Request retry if back-end server response times out