HTTP configurations

HTTP configurations for a NetScaler appliance can be specified in an entity called an HTTP profile, which is a collection of HTTP settings. The HTTP profile can then be associated with services or virtual servers that want to use these HTTP configurations.

A default HTTP profile can be configured to set the HTTP configurations that will be applied by default, globally to all services and virtual servers.

Note: When a HTTP parameter has different values for service, virtual server, and globally, the value of the most-specific entity (the service) is given the highest precedence.

The NetScaler appliance also provides other approaches for configuring HTTP. Read on for more information.

The NetScaler supports WebSocket protocol which allows browsers and other clients to create a bi-directional, full duplex TCP connection to the servers. The NetScaler implementation of WebSocket is RFC 6455 compliant.

Note

A NetScaler appliance now supports the User Source IP (USIP) address configuration for both HTTP/1.1 and HTTP/2 protocols.

Setting global HTTP parameters

The NetScaler appliance allows you to specify values for HTTP parameters that are applicable to all NetScaler services and virtual servers. This can be done using:

  • Default HTTP profile
  • Global HTTP command

Default HTTP profile

A HTTP profile, named as nshttp_default_profile, is used to specify HTTP configurations that will be used if no HTTP configurations are provided at the service or virtual server level.

Note:

  • Not all HTTP parameters can be configured through the default HTTP profile. Some settings have to be performed by using the global HTTP command (see section below).
  • The default profile does not have to be explicitly bound to a service or virtual server.

To configure the default HTTP profile

  • Using the command line interface, at the command prompt enter:

    set ns httpProfile nshttp_default_profile …

  • On the GUI, navigate to System > Profiles, click HTTP Profiles and update nshttp_default_profile.

Global HTTP command

Another approach you can use to configure global HTTP parameters is the global HTTP command. In addition to some unique parameters, this command duplicates some parameters that can be set by using a HTTP profile. Any update made to these duplicate parameters is reflected in the corresponding parameter in the default HTTP profile.

For example, if the maxReusePool parameter is updated using this approach, the value is reflected in the maxReusePool parameter of the default HTTP profile (nshttp_default_profile).

Note:

Citrix recommends that you use this approach only for HTTP parameters that are not available in the default HTTP profile.

To configure the global HTTP command

  • Using the command line interface, at the command prompt enter:

    set ns httpParam …

  • On the GUI, navigate to System > Settings, click Change HTTP parameters and update the required HTTP parameters.

Setting Service or Virtual Server Specific HTTP Parameters

Using HTTP profiles, you can specify HTTP parameters for services and virtual servers. You must define a HTTP profile (or use a built-in HTTP profile) and associate the profile with the appropriate service and virtual server.

Note:

You can also modify the HTTP parameters of default profiles as per your requirements.

To specify service or virtual server level HTTP configurations by using the command line interface

At the command prompt, perform the following:

  1. Configure the HTTP profile.

    set ns httpProfile <profile-name>...

  2. Bind the HTTP profile to the service or virtual server.

    To bind the HTTP profile to the service:

set service <name> .....

**Example**:

```
> set service service1 -httpProfileName profile1
```

To bind the HTTP profile to the virtual server:

`set lb vserver \<name\> .....`

**Example**:

```
> set lb vserver lbvserver1 -httpProfileName profile1
```

To specify service or virtual server level HTTP configurations by using the GUI

At the GUI, perform the following:

  1. Configure the HTTP profile.

    Navigate to System > Profiles > HTTP Profiles, and create the HTTP profile.

  2. Bind the HTTP profile to the service or virtual server.

    Navigate to Traffic Management > Load Balancing > Services/Virtual Servers, and create the HTTP profile, which should be bound to the service/virtual server.

Built-in HTTP Profiles

For convenience of configuration, the NetScaler provides some built-in HTTP profiles. Review the profiles listed below and use it as it is or modify it to meet your requirements. You can bind these profiles to the required services or virtual servers.

Built-in profile Description
nshttp_default_profile Represents the default global HTTP settings on the appliance.
nshttp_default_strict_validation Settings for deployments that require strict validation of HTTP requests and responses.

Sample HTTP Configurations

Sample command line interface examples to configure the following:

  • HTTP band statistics
  • WebSocket connections

HTTP band statistics

Specify the band size for HTTP requests and responses.

> set protocol httpBand reqBandSize 300 respBandSize 2048
Done
> show protocol httpband -type REQUEST

WebSocket connections

Enable webSocket on the required HTTP profile.

> set ns httpProfile http_profile1 -webSocket ENABLED
Done
> set lb vserver lbvserver1 -httpProfileName profile1
Done