ADC

正常关闭服务

从 NetScaler 12.1 版本 49.xx 开始,Citrix ADC 群集支持正常关闭服务。要正常关闭服务,您可以执行以下任务之一。

  • 显式禁用该服务,并且

    • 设置延迟(以秒为单位)。
    • 启用正常关闭。
  • 向监视器添加 TROFS 代码或字符串。

有关更多详细信息,请参阅 优雅关闭服务

使用 CLI 为服务配置正常关闭

仅使用正常选项禁用:

在命令提示符下,键入:

disable service <name> [-graceFul (YES|NO)]  

show service <name>
<!--NeedCopy-->

示例

disable service svc1 -graceFul YES
Done
sh service svc1
                svc1 (10.102.225.11:80) - HTTP
                State: GOING OUT OF SERVICE   Graceful (number of active clients: 1)
                Last state change was at Wed Jul 25 10:46:29 2018
                Time since last state change: 0 days, 00:00:02.680
                ……….
                ……….
                Traffic Domain: 0

1)            Monitor Name: tcp-default
                                State: UP             Weight: 1             Passive: 0
                                Probes: 26           Failed [Total: 0 Current: 0]
                                Last response: Success - TCP syn+ack received.
                                Response Time: 0.0 millisec
<!--NeedCopy-->

禁用超时和正常选项:

在命令提示符下,键入:

disable service <name> [<delay>] [-graceFul (YES|NO)]  

show service <name>  
<!--NeedCopy-->

示例

disable service svc1 2000 -graceFul YES

Done
> sh service svc1
                svc1 (10.102.225.11:80) - HTTP
                State: GOING OUT OF SERVICE (Graceful (number of active clients: 1), Out Of Service in 1998 seconds)
                Last state change was at Wed Jul 25 10:49:08 2018
                Time since last state change: 0 days, 00:00:01.710
                ……….
                ……….
                Traffic Domain: 0

1)            Monitor Name: tcp-default
                                State: UP             Weight: 1             Passive: 0
                                Probes: 57           Failed [Total: 0 Current: 0]
                                Last response: Success - TCP syn+ack received.
                                Response Time: 0.0 millisec
Done
<!--NeedCopy-->

使用超时和正常选项禁用服务组:

在命令提示符下,键入:

disable serviceGroup <serviceGroupName>@ [<serverName>@ <port>] [-delay
<secs>] [-graceFul ( YES | NO )]
Show service group <serviceGroupName>
<!--NeedCopy-->

示例:

disable servicegroup sg -delay 2000 -graceFul yes
sh servicegroup sg
                sg - HTTP
                State: DISABLED                Effective State: OUT OF SERVICE Monitor Threshold : 0
                Max Conn: 0       Max Req: 0          Max Bandwidth: 0 kbits
                Use Source IP: NO
                Client Keepalive(CKA): NO
                ……….
                ………


                1)   200.200.10.21:80       Server Name: server3    Server ID: None Weight: 1
                                State:    GOING OUT OF SERVICE (learnt from node:2 )     Graceful (number of active clients: 6), Out Of Service in 1993 seconds
                                Last state change was at Mon Aug 13 15:15:11 2018
                                ………

                2)   200.200.10.22:80       Server Name: server4    Server ID: None Weight: 1
                                State:    GOING OUT OF SERVICE (learnt from node:2 )     Graceful (number of active clients: 7), Out Of Service in 1993 seconds
                                Last state change was at Mon Aug 13 15:15:11 2018
<!--NeedCopy-->

注意: CLIP 显示来自所有群集节点的所有活动客户端连接的聚合值。

使用 GUI 为服务配置正常关闭

  1. 导航到流量管理 > 负载平衡 > 服务
  2. 打开该服务,然后从 “操作” 列表中单击 “ 禁用”。输入等待时间,然后选择正常。

使用 CLI 在监视器中配置 TROFS 代码或字符串

在命令提示符下,键入以下命令之一:

add lb monitor <monitor-name> HTTP -trofsCode <respcode>
add lb monitor <monitor-name> HTTP-ECV  -trofsString <resp string>
add lb monitor <monitor-name> TCP-ECV  -trofsString <resp string>
<!--NeedCopy-->

使用 GUI 在监视器中配置 TROFS 代码或字符串

  1. 导航到流量管理 > 负载平衡 > 监视器

  2. 在“监视器”窗格上,单击“添加”,然后执行以下步骤之一:

    • 选择“键入为 HTTP”,然后指定 TROFS 代码。
    • 选择类型为 http-ecv 或 tcp-ecv,然后指定 TROFS 字符串。
正常关闭服务