ADC

Request retry if back-end server resets TCP connection

When a back-end server resets a TCP connection, the request retry feature forwards the request to the next available server, instead of sending the reset to the client. By doing reload balancing, the client saves RTT when the appliance initiates the same request to next available service.

How request retry works when back-end server resets a TCP connection

The following diagram shows how components interact with each other.

How request retry works for TCP connection reset

  1. The process starts by enabling appqoe feature on your appliance.
  2. When the client sends an HTTP or HTTPS request, the load balancing virtual server sends the request to the back-end server.
  3. If the requested service is unavailable, the back-end server resets the TCP connection.
  4. If the appqoe configuration has “retry” enabled with the desired number of retry attempts specified, the load balancing virtual server uses the configured load balancing algorithm to forward the request to the next available application server.
  5. After the load balancing virtual server receives the response, the appliance forwards the response to the client.
  6. If the available back-end servers is equal or lesser than the retry count and if all the servers send reset, 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 resets the connection, then the appliance returns a 500 internal server error to the client.
  7. Similarly, if the number of back-end servers is more than the retry count and if the back-end servers resets the connection, the appliance forwards the reset to the client. Consider a scenario with three back-end servers and the retry count set as two. If the three servers resets the connection, then the appliance sends a reset response to the client.

Configure request retry for GET method

For configuring retry feature for GET method, you must complete the following steps.

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

Enable AppQoE

At the command prompt, type: enable ns feature appqoe

Add AppQoE action

You must configure an AppQoE action to specify if you want the appliance to retry after a TCP reset and the number of retry attempts.

add appqoe action reset_action -retryOnReset ( YES | NO ) -numretries <positive_integer>]

Example:

add appqoe action reset_action –retryOnReset YES –numretries 5

Where, retryOnReset. Enable retry if the back-end server resets a TCP connection. numretries. Retry count.

Add AppQoE policy

To implement AppQoE you must configure AppQoE policy to prioritize incoming HTTP or SSL request in a specific queue.

At the command prompt, type:

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

Example:

add appqoe policy reset_policy -rule http.req.method.eq(get) -action reset_action

Bind appqoe policy to load balancing virtual server

When a back-end server resets a TCP packet request and if you want the load balancing virtual server to forward the request to the next available service, you must bind the load balancing virtual server to the AppQoE policy.

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 reset_policy -type REQUEST -priority 1

Configure request retry for POST requests

You must always exercise caution when you reload balance requests that write data into the back-end server. For such requests, ensure the content length is short. If the content length is long, then it might result in resource consumption. Follow the steps given below to configure reload balancing for POST requests.

  1. Enable AppQoE
  2. Add AppQoE action
  3. Add AppQoE policy
  4. Bind appQoE policy to load balancing virtual server

Enable AppQoE

At the command prompt, type:

enable ns feature appqoe

Add Appqoe action

You must add an AppQoE action to retry after a TCP reset and number of retry attempts.

add appqoe action reset_action -retryOnReset ( YES | NO ) -numretries <positive_integer>]

Example:

add appqoe action reset_action –retryOnReset YES –numretries 5

Add Appqoe policy

To implement AppQoE you must configure AppQoE policy to define how to queue the connections in a specific queue.

At the command prompt, type:

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

Example:

add appqoe policy reset_policy -rule HTTP.REQ.CONTENT_LENGTH.le(2000) -action reset_action

Note:

You can use this configuration if you prefer to restrict the request retry feature for content length less than 2000.

Bind load balancing virtual server to AppQoE policy

When a back-end server resets a TCP packet request and if you want the load balancing virtual server to forward the request to the next available service through a specific queue, you must bind the load balancing virtual server to the AppQoE policy.

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 reset_policy -type REQUEST -priority 1

Configure AppQoE policy for request retry by using the Citrix ADC 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 an action, see Create AppQoE Action section. c. Expression. Select or enter HTTP.REQ.CONTENT_LENGTH.le (2000) policy expression.
  4. Click Create and Close.

Configure AppQoE action for request retry balancing by using the Citrix ADC 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 parameters for retry on TCP reset: a. Retry on TCP Reset. Select the check box to enable retry action for TCP reset. b. Retry Count. Enter the retry count.
  4. Click Create and Close.

Configure request retry for GET method when back-end server resets on TCP SYN establishment

The CLI and GUI configuration is similar to steps followed for GET method. For more information, see Configure request try for GET method section. when back-end server resets a connection section.

Request retry if back-end server resets TCP connection