ADC NITRO APIs

lbparameter

Configuration for LB parameter resource.

Properties

(click to see Operations )

Name Data Type Permissions Description
httponlycookieflag Read-write Include the HttpOnly attribute in persistence cookies. The HttpOnly attribute limits the scope of a cookie to HTTP requests and helps mitigate the risk of cross-site scripting attacks.

Default value: ENABLED

Possible values = ENABLED, DISABLED
usesecuredpersistencecookie Read-write Encode persistence cookie values using SHA2 hash.

Default value: DISABLED

Possible values = ENABLED, DISABLED
useencryptedpersistencecookie Read-write Encode persistence cookie values using SHA2 hash.

Default value: DISABLED

Possible values = ENABLED, DISABLED
cookiepassphrase Read-write Use this parameter to specify the passphrase used to generate secured persistence cookie value. It specifies the passphrase with a maximum of 31 characters.
consolidatedlconn Read-write To find the service with the fewest connections, the virtual server uses the consolidated connection statistics from all the packet engines. The NO setting allows consideration of only the number of connections on the packet engine that received the new connection.

Default value: YES

Possible values = YES, NO
useportforhashlb Read-write Include the port number of the service when creating a hash for hash based load balancing methods. With the NO setting, only the IP address of the service is considered when creating a hash.

Default value: YES

Possible values = YES, NO
preferdirectroute Read-write Perform route lookup for traffic received by the Citrix ADC, and forward the traffic according to configured routes. Do not set this parameter if you want a wildcard virtual server to direct packets received by the appliance to an intermediary device, such as a firewall, even if their destination is directly connected to the appliance. Route lookup is performed after the packets have been processed and returned by the intermediary device.

Default value: YES

Possible values = YES, NO
startuprrfactor Read-write Number of requests, per service, for which to apply the round robin load balancing method before switching to the configured load balancing method, thus allowing services to ramp up gradually to full load. Until the specified number of requests is distributed, the Citrix ADC is said to be implementing the slow start mode (or startup round robin). Implemented for a virtual server when one of the following is true
  • The virtual server is newly created.
  • One or more services are newly bound to the virtual server.
  • One or more services bound to the virtual server are enabled.
  • The load balancing method is changed. This parameter applies to all the load balancing virtual servers configured on the Citrix ADC, except for those virtual servers for which the virtual server-level slow start parameters (New Service Startup Request Rate and Increment Interval) are configured. If the global slow start parameter and the slow start parameters for a given virtual server are not set, the appliance implements a default slow start for the virtual server, as follows
  • For a newly configured virtual server, the appliance implements slow start for the first 100 requests received by the virtual server.
  • For an existing virtual server, if one or more services are newly bound or newly enabled, or if the load balancing method is changed, the appliance dynamically computes the number of requests for which to implement startup round robin. It obtains this number by multiplying the request rate by the number of bound services (it includes services that are marked as DOWN). For example, if the current request rate is 20 requests/s and ten services are bound to the virtual server, the appliance performs startup round robin for 200 requests. Not applicable to a virtual server for which a hash based load balancing method is configured.
  • monitorskipmaxclient Read-write When a monitor initiates a connection to a service, do not check to determine whether the number of connections to the service has reached the limit specified by the service’s Max Clients setting. Enables monitoring to continue even if the service has reached its connection limit.

    Default value: DISABLED

    Possible values = ENABLED, DISABLED
    monitorconnectionclose Read-write Close monitoring connections by sending the service a connection termination message with the specified bit set.

    Default value: FIN

    Possible values = RESET, FIN
    vserverspecificmac Read-write Allow a MAC-mode virtual server to accept traffic returned by an intermediary device, such as a firewall, to which the traffic was previously forwarded by another MAC-mode virtual server. The second virtual server can then distribute that traffic across the destination server farm. Also useful when load balancing Branch Repeater appliances.

    Note: The second virtual server can also send the traffic to another set of intermediary devices, such as another set of firewalls. If necessary, you can configure multiple MAC-mode virtual servers to pass traffic successively through multiple sets of intermediary devices.

    Default value: DISABLED

    Possible values = ENABLED, DISABLED
    allowboundsvcremoval Read-write This is used, to enable/disable the option of svc/svcgroup removal, if it is bound to one or more vserver. If it is enabled, the svc/svcgroup can be removed, even if it bound to vservers. If disabled, an error will be thrown, when the user tries to remove a svc/svcgroup without unbinding from its vservers.

    Default value: ENABLED

    Possible values = ENABLED, DISABLED
    retainservicestate Read-write This option is used to retain the original state of service or servicegroup member when an enable server command is issued.

    Default value: OFF

    Possible values = ON, OFF
    dbsttl Read-write Specify the TTL for DNS record for domain based service. The default value of ttl is 0 which indicates to use the TTL received in DNS response for monitors.

    Default value: 0
    maxpipelinenat Read-write Maximum number of concurrent requests to allow on a single client connection, which is identified by the - tuple. This parameter is applicable to ANY service type and all UDP service types (except DNS) and only when "svrTimeout" is set to zero. A value of 0 (zero) applies no limit to the number of concurrent requests allowed on a single client connection.
    literaladccookieattribute Read-write String configured as LiteralADCCookieAttribute will be appended as attribute for Citrix ADC cookie (for example: LB cookie persistence , GSLB site persistence, CS cookie persistence, LB group cookie persistence).



    Sample usage -

    set lb parameter -LiteralADCCookieAttribute “;SameSite=None”.
    computedadccookieattribute Read-write ComputedADCCookieAttribute accepts ns variable as input in form of string starting with $ (to understand how to configure ns variable, please check man add ns variable). policies can be configured to modify this variable for every transaction and the final value of the variable after policy evaluation will be appended as attribute to Citrix ADC cookie (for example: LB cookie persistence , GSLB sitepersistence, CS cookie persistence, LB group cookie persistence). Only one of ComputedADCCookieAttribute, LiteralADCCookieAttribute can be set.



    Sample usage -

    add ns variable lbvar -type TEXT(100) -scope Transaction

    add ns assignment lbassign -variable $lbvar -set “\“;SameSite=Strict\””

    add rewrite policy lbpol lbassign

    bind rewrite global lbpol 100 next -type RES_OVERRIDE

    set lb param -ComputedADCCookieAttribute "$lbvar"

    For incoming client request, if above policy evaluates TRUE, then SameSite=Strict will be appended to ADC generated cookie.
    storemqttclientidandusername Read-write This option allows to store the MQTT clientid and username in transactional logs.

    Default value: NO

    Possible values = YES, NO
    dropmqttjumbomessage Read-write When this option is enabled, MQTT messages of length greater than 64k will be dropped and the client/server connections will be reset.

    Default value: YES

    Possible values = YES, NO
    lbhashalgorithm Read-write This option dictates the hashing algorithm used for hash based LB methods (URLHASH, DOMAINHASH, SOURCEIPHASH, DESTINATIONIPHASH, SRCIPDESTIPHASH, SRCIPSRCPORTHASH, TOKEN, USER_TOKEN, CALLIDHASH).

    Default value: DEFAULT

    Possible values = DEFAULT, PRAC, JARH
    lbhashfingers Read-write This option is used to specify the number of fingers to be used in PRAC and JARH algorithms for hash based LB methods. Increasing the number of fingers might give better distribution of traffic at the expense of additional memory.

    Default value: 256

    Minimum value = 1

    Maximum value = 1024
    undefaction Read-write Action to perform when policy evaluation creates an UNDEF condition. Available settings function as follows
  • NOLBACTION - Does not consider LB action in making LB decision.
  • RESET - Reset the request and notify the user, so that the user can resend the request.
  • DROP - Drop the request without sending a response to the user. Default value: “NOLBACTION”
  • proximityfromself Read-write Use the ADC location instead of client IP for static proximity LB or GSLB decision.

    Default value: NO

    Possible values = YES, NO
    sessionsthreshold Read-only This option is used to get the upper-limit on the number of persistent sessions set by the administrator for this system.

    Minimum value = 1
    builtin <String[]> Read-only .

    Possible values = MODIFIABLE, DELETABLE, IMMUTABLE, PARTITION_ALL
    feature Read-only The feature to be checked while applying this config.
    adccookieattributewarningmsg Read-only Used to describe any configuration issue with respect to ns variable configured as part of set lb parameter.
    lbhashalgowinsize Read-only This options allows to increase window size used in LB hashing algorithm(DEFAULT).

    Default value: 16
    overridepersistencyfororder Read-only This option is used to override persistency when order is configured for services or servicegroups.

    Default value: NO

    Possible values = YES, NO

    Operations

    (click to see Properties )

    • UPDATE
    • UNSET
    • GET (ALL)

    Some options that you can use for each operations:

    • Getting warnings in response: NITRO allows you to get warnings in an operation by specifying the 'warning' query parameter as 'yes'. For example, to get warnings while connecting to the NetScaler appliance, the URL is as follows:

      http:// <netscaler-ip-address> /nitro/v1/config/login?warning=yes

      If any, the warnings are displayed in the response payload with the HTTP code '209 X-NITRO-WARNING'.

    • Authenticated access for individual NITRO operations: NITRO allows you to logon to the NetScaler appliance to perform individual operations. You can use this option instead of creating a NITRO session (using the login object) and then using that session to perform all operations,

      To do this, you must specify the username and password in the request header of the NITRO request as follows:

      X-NITRO-USER: <username>

      X-NITRO-PASS: <password>

      Note: In such cases, make sure that the request header DOES not include the following:

      Cookie:NITRO_AUTH_TOKEN= <tokenvalue>

    *Note: * Mandatory parameters are marked in red and placeholder content is marked in green

    update

    URL: http:// <netscaler-ip-address> /nitro/v1/config/lbparameter HTTP Method: PUT

    Request Headers:

    Cookie:NITRO_AUTH_TOKEN= <tokenvalue>

    Content-Type:application/json

    Request Payload:

    {"lbparameter":{
    "httponlycookieflag":<String_value>,
    "usesecuredpersistencecookie":<String_value>,
    "useencryptedpersistencecookie":<String_value>,
    "cookiepassphrase":<String_value>,
    "consolidatedlconn":<String_value>,
    "useportforhashlb":<String_value>,
    "preferdirectroute":<String_value>,
    "startuprrfactor":<Double_value>,
    "monitorskipmaxclient":<String_value>,
    "monitorconnectionclose":<String_value>,
    "vserverspecificmac":<String_value>,
    "allowboundsvcremoval":<String_value>,
    "retainservicestate":<String_value>,
    "dbsttl":<Double_value>,
    "maxpipelinenat":<Double_value>,
    "literaladccookieattribute":<String_value>,
    "computedadccookieattribute":<String_value>,
    "storemqttclientidandusername":<String_value>,
    "dropmqttjumbomessage":<String_value>,
    "lbhashalgorithm":<String_value>,
    "lbhashfingers":<Double_value>,
    "undefaction":<String_value>,
    "proximityfromself":<String_value>
    }}
    
    <!--NeedCopy-->
    

    Response: HTTP Status Code on Success: 200 OK

    HTTP Status Code on Failure: 4xx <string> (for general HTTP errors) or 5xx <string> (for NetScaler-specific errors). The response payload provides details of the error

    unset

    URL: http:// <netscaler-ip-address> /nitro/v1/config/lbparameter? action=unset HTTP Method: POST

    Request Headers:

    Cookie:NITRO_AUTH_TOKEN= <tokenvalue>

    Content-Type:application/json

    Request Payload:

    {"lbparameter":{
    "httponlycookieflag":true,
    "usesecuredpersistencecookie":true,
    "useencryptedpersistencecookie":true,
    "cookiepassphrase":true,
    "consolidatedlconn":true,
    "useportforhashlb":true,
    "preferdirectroute":true,
    "startuprrfactor":true,
    "monitorskipmaxclient":true,
    "monitorconnectionclose":true,
    "vserverspecificmac":true,
    "allowboundsvcremoval":true,
    "retainservicestate":true,
    "dbsttl":true,
    "maxpipelinenat":true,
    "literaladccookieattribute":true,
    "computedadccookieattribute":true,
    "storemqttclientidandusername":true,
    "dropmqttjumbomessage":true,
    "lbhashalgorithm":true,
    "lbhashfingers":true,
    "undefaction":true,
    "proximityfromself":true
    }}
    
    <!--NeedCopy-->
    

    Response: HTTP Status Code on Success: 200 OK

    HTTP Status Code on Failure: 4xx <string> (for general HTTP errors) or 5xx <string> (for NetScaler-specific errors). The response payload provides details of the error

    get (all)

    URL: http:// <netscaler-ip-address> /nitro/v1/config/lbparameter HTTP Method: GET

    Request Headers:

    Cookie:NITRO_AUTH_TOKEN= <tokenvalue>

    Accept:application/json

    Response: HTTP Status Code on Success: 200 OK

    HTTP Status Code on Failure: 4xx <string> (for general HTTP errors) or 5xx <string> (for NetScaler-specific errors). The response payload provides details of the error

    Response Header:

    Content-Type:application/json

    Response Payload:

    { "lbparameter": [ {
    "httponlycookieflag":<String_value>,
    "usesecuredpersistencecookie":<String_value>,
    "useencryptedpersistencecookie":<String_value>,
    "cookiepassphrase":<String_value>,
    "consolidatedlconn":<String_value>,
    "useportforhashlb":<String_value>,
    "preferdirectroute":<String_value>,
    "startuprrfactor":<Double_value>,
    "monitorskipmaxclient":<String_value>,
    "monitorconnectionclose":<String_value>,
    "vserverspecificmac":<String_value>,
    "sessionsthreshold":<Double_value>,
    "builtin":<String[]_value>,
    "feature":<String_value>,
    "allowboundsvcremoval":<String_value>,
    "retainservicestate":<String_value>,
    "dbsttl":<Double_value>,
    "maxpipelinenat":<Double_value>,
    "literaladccookieattribute":<String_value>,
    "computedadccookieattribute":<String_value>,
    "adccookieattributewarningmsg":<String_value>,
    "storemqttclientidandusername":<String_value>,
    "dropmqttjumbomessage":<String_value>,
    "lbhashalgowinsize":<Double_value>,
    "lbhashalgorithm":<String_value>,
    "lbhashfingers":<Double_value>,
    "undefaction":<String_value>,
    "overridepersistencyfororder":<String_value>,
    "proximityfromself":<String_value>
    }]}
    
    <!--NeedCopy-->
    
    lbparameter