How to Limit Virtual Server Connections and Drop New Connection Attempts

How to Limit Virtual Server Connections and Drop New Connection Attempts

book

Article ID: CTX132806

calendar_today

Updated On:

Description

This article describes how to configure a virtual server and the associated services and servers to drop new connection requests while keeping existing connections active at a specific connection level.

Scenario

A customer wanted the NetScaler appliance to drop new connection requests arriving at a load balancing virtual server if the services reached a specific number of connections, and continue with the active connections.

The customer tried to use the maximum client connections parameter configured on a service. But, the load balancing virtual server continued to accept connections and place them in the surge queue for processing when new connections are available or until the connection times out.


Instructions

To configure a virtual server, associated services, and servers to drop new connection requests while keeping existing connections active at a specific connection level, the server is set to accept maximum number of TCP connections. The down state flush parameter is disabled on the service and virtual server on a NetScaler appliance. This ensures that both the connections are kept alive when the virtual server goes down.

Complete the following procedure, to configure the appliance to drop the connections as required:

  1. Configure the backend server to accept a maximum number of TCP connections.
    Note: This configuration must be completed on the server and not on the NetScaler appliance. The procedure is different for each type of server. For Apache, this involves changing the MaxClients setting.

  2. Run the following command to disable downstateflush on a service:
    >set service <service name> -downStateFlush DISABLED

    Or

    >add service <name> (<IP> | <serverName>) <serviceType> <port> -downStateFlush DISABLED

  3. Run the following command to disable downstateflush on the virtual server:
    >set lb vserver <name> -downStateFlush DISABLED

    Or

    >add lb vserver <name> <serviceType> (<IPAddress> <port>) -downStateFlush DISABLED

In the Configuration Utility, ensure that the Down State Flush option is cleared for the service and the virtual server as shown in the following screen shots:

  • Service
    User-added image

  • Virtual Server
    User-added image

It is important to note that for this configuration, you must use the monitor type HTTP or TCP. Therefore, when the application stops accepting connections the monitor fails. However, a PING monitor should not be used as it reports overall server health and not a specific port.

Issue/Introduction

This article describes how to configure a virtual server and associated services and servers to drop new connection requests, while keeping existing connections active at a specific connection level.

Additional Information

CTX124710 - Citrix NetScaler Down State Flush Feature