This article describes how to stop clients from connection reuse on a NetScaler virtual server, which is the opposite of Client Keep-Alive behavior.
When maxreq is configured to "1" on a service, it forces the NetScaler appliance to reconnect to the server each time and stops server side connection multiplexing. However, the client can still reuse a connection to the NetScaler virtual server.
Configure the maxreq to "1" and bind that profile to a virtual server. After one request-response, the client connection will be closed actively.
This option causes the appliance to close the TCP socket as soon as the first request and response is sent and completed. The appliance will insert a "FIN" request at the end of the response.
> show httpprofile 1) Name: nshttp_default_profile Drop invalid HTTP requests: DISABLED Mark HTTP/0.9 requests as invalid: DISABLED Mark CONNECT requests as invalid: DISABLED Enabled compression on PUSH: DISABLED Connection multiplexing: ENABLED Max number of Reusepool connections: 0 Request Timeout: 0 sec (DISABLED) Adaptive Request Timeout: DISABLED Request Timeout Action: Drop extra data from Server: DISABLED Drop extra CRLF: ENABLED Max Incomplete header delay: 7000 WebSocket Connections: DISABLED Client IP header expression: Weblogging: ENABLED Max Requests per connection: 0 (DISABLED) Persistent ETag: DISABLED Reference count: 13
Please note WebSocket is supported on NetScaler build 10.1 and later versions.
In earlier builds of the software, you must disable Client Keep-Alive to make the clients reconnect to the NetScaler virtual server.