Jump to content
Welcome to our new Citrix community!

ADC NITRO API / server disable graceful delay


Recommended Posts

i am looking for clarification on the impact of delay being 0 seconds when coupled with graceful YES


example:
http://<netscaler-ip-address>/nitro/v1/config/server?action=disable
'{"server":{ "name":"serverName", "delay":"0", "graceful":"YES"}}'


does 0 equate to "no time limit" or would it effectively  nullify the graceful:yes ?

 

Link to comment
Share on other sites

0 is no delay; does not nullify graceful yes.

They are two different behaviors.

Graceful shutdown (with or without delay), stops the service/server from getting new transactions, but allows outstanding transactions to complete (hence the "graceful").

 

If you do graceful shutdown with 0 delay, then the graceful shutdown begins immediately. New connections will not be accepted and the outstanding would complete. As opposed to stopping all tranactions the moment the disable is applied (without a graceful shutdown at all)

 

The graceful shutdown with delay, delays the start of the graceful shutdown cycle. So lets say timeout is 10 seconds (don't remember unit in the actual command).  Then regular load balancing traffic handling to server continues for the next 10 seconds once command applied and then the graceful process begins (aka 10 seconds delayed).

 

 

 

 

Link to comment
Share on other sites

I very much appreciate the response, Rhonda.

Is there a difference in graceful/delay functions between a server and a service?

The documentation seems to suggest that delay does not function the way that you describe, but i might not be interpreting something correctly.
Maybe there's some difference when applied via API?

https://docs.citrix.com/en-us/citrix-adc/12-1/load-balancing/load-balancing-advanced-settings/graceful-shutdown.html
Graceful shutdown is enabled and a wait time is specified :
Service is shut down after the last of the current active client connections is served, even if the wait time has not expired. The appliance checks the status of the connections once every second. If the wait time expires, any open sessions are closed.

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

 I really appreciate your time on this

Link to comment
Share on other sites

And I did state the delay/wait time improperly - I goofed.  

 

To Clarify:

Graceful Shutdown OFF with Delay:  Just delays service down, until delay time expires. Then all connections terminated.

Graceful Shutdown ON with NO Delay:  Graceful shutdown shutsdown service after existing outstanding transactions complete.

Graceful Shutdown ON with Delay Time Set:  Delay does trump graceful in this case but puts a limit on the allowed time to complete transactions until service is set off. So if active sessions complete before delay expires, then the service will go down at that point. If still ongoing transactions and the delay expires, the sessions are terminated So the delay is the time until the service is disabled. If active transactions are still occurring at that point, then the delay is too short or they go away anyway.  (And I DID misstate that the first time.)

 

 

[Admin guide Quote]

Often, however, you cannot estimate the amount of time needed for all the connections to a service to complete the existing transactions. If a transaction is unfinished when the wait time expires, shutting down the service may result in data loss. In this case, you can specify graceful shutdown for the service, so that the service is disabled only when all the current active client connections are closed by either the server or the client.

 

See the following table for behavior if you specify a wait time in addition to graceful shutdown.

Persistence is maintained according to the specified method even if you enable graceful shutdown. The system continues to serve all the persistent clients, including new connections from the clients, unless the service is marked DOWN during the graceful shutdown state as a result of the checks made by a monitor.

The following table describes graceful shut down options.

StateResults

  • Graceful shutdown is enabled and a wait time is specified:  Service is shut down after the last of the current active client connections is served, even if the wait time has not expired. The appliance checks the status of the connections once every second. If the wait time expires, any open sessions are closed.
  • Graceful shutdown is disabled and a wait time is specified:  Service is shut down only after the wait time expires, even if all established connections are served before expiration.
  • Graceful shutdown is enabled and no wait time is specified:  Service is shut down only after the last of the previously established connections is served, regardless of the time taken to serve the last connection.
  • Graceful shutdown is disabled and no wait time is specified:  No graceful shutdown. Service is shut down immediately after the disable option is chosen or the disable command is issued. (The default wait time is zero seconds.)

[END QUOTE]

 

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...