Configure a set of IP addresses for a service group in one NITRO API call

In Kubernetes, the kube-apiserver sends the updated set of IP addresses. Admins manually compared the IP addresses in the existing configuration and IP addresses provided by the kube-apiserver. Admins bound the IP addresses that were added and unbound the IP addresses that were removed. Also, the admins unbound the IP address only after the service transitioned to OFS (out-of-service) state.

Support is added to configure set of IP addresses for a service group in one NITRO API call. A new value “API” is added to the existing autoscale option in the Citrix ADC appliance interface. For service groups with the API autoscale type, the admins can provide the set of IP addresses in one NITRO call. On receiving the NITRO API call, the Citrix ADC appliance automatically binds the IP addresses that are added and unbinds the IP addresses that are removed.

Previously, only one service group member could be bound in a NITRO call.

The following is an example NITRO API call with the set of IP addresses defined.

curl -u nsroot:nsroot http://10.102.217.48/nitro/v1/config -H "Content-Type:application/x-www-form-urlencoded" -d 'object={"servicegroup_servicegroupmemberlist_binding": {"servicegroupname": "sg1", "members": [{"ip": "1.1.1.1", "port": 80}, {"ip": "1.1.1.10", "port": 80}]}}'

Note: You can only bind IP address based services to the API type service group. You cannot bind domain based services to the API type service group.

Create a service group of type API by using the CLI

At the command prompt, type;

add serviceGroup <serviceGroupName>@ <serviceType> [-autoScale <autoScale>]

Example:

add serviceGroup svg1 HTTP -autoScale API

You can configure the autoDisablegraceful and autoDisabledelay parameters by using add serviceGroup or set serviceGroup command.

-  add serviceGroup <serviceGroupName>@ <serviceType> [-autoScale <autoScale>] [-autoDisablegraceful ( YES | NO)] [-autoDisabledelay <secs>]

-  set serviceGroup <serviceGroupName [-autoDisablegraceful ( YES | NO)] [-autoDisabledelay <secs>]

Example:

-  add serviceGroup svg1 HTTP -autoScale API autoDisablegraceful YES -autoDisabledelay 100

-  set serviceGroup svg1 -autoDisablegraceful  YES -autoDisabledelay 100

Arguments

autoDisablegraceful

Indicates graceful shutdown of the service. If this option is enabled, the appliance waits for all outstanding connections to this service to be closed before deleting the service. For clients that already have a persistent session on the system, new connections or requests continue to be sent to this service. The service member is deleted only if there are no outstanding connections. Default value: NO

autoDisabledelay

Indicates the time allowed (in seconds) for a graceful shutdown. During this period new connections or requests continue to be sent to this service for clients that already have a persistent session on the system. Connections or requests from new clients that do not have persistence sessions on the system are not sent to the service. Instead, they are load balanced among other available services. After the delay time expires, the service member is deleted.

Important:

  • The autoDisablegraceful and autoDisabledelay parameters are applicable only for the service groups of autoscale type “API” and “CLOUD.”
  • If the autoDisablegraceful or the autoDisabledelay parameters are not configured, then service members are deleted immediately.

Unbind an IP addresses gracefully

If any of the IP addresses is not in the desired state list, those IP addresses are unbound based on the autoDisablegraceful or autoDisabledelay parameters.

  • If one of these parameters is set, then the IP address is unbound gracefully.
  • If none of these parameters are set, then the IP address is unbound immediately.

Note:

  • IP addresses identified for graceful unbind are displayed only when the show servicegroup command is executed.
  • You cannot perform any operation (such as set, unset) on the service group member identified for graceful unbind.

The following figure displays a sample show servicegroup command.

Sample show service group command

Create a service group of type API by using the GUI

  1. Navigate to Traffic Management > Load Balancing > Service Groups, and click Add.

  2. In AutoScale Mode, select API.

Configure graceful shutdown or a time delay for an API type service group by using the GUI

  1. Navigate to Traffic Management > Load Balancing > Service Groups.

    Basic settings of service groups

  2. In AutoScale Mode, select API.

  3. In Auto Disable Graceful, select YES.

  4. In Auto Disable Delay, enter the wait time for a graceful shutdown.

Note: The Auto Disable Graceful or Auto Display Delay fields are enabled only if you select API or CLOUD in AutoScale Mode.