[Webinar] Streamline your web hosting managementRegister Today


Netscaler 10 Draining a Service

Posted on 2014-12-09
Medium Priority
Last Modified: 2016-10-25
A while back I open the following question on how to drain a service. http://www.experts-exchange.com/Software/System_Utilities/Remote_Access/Citrix/Q_28460073.html

I at that time we were running Netscaler 9.3 but have since upgrade to 10.1.

This morning I needed to drain a number of services and did the following.

1) For the service unchecked "Down State Flush" and clicked OK
2) Reopened the service and selected disabled and graceful shutdown and left the time to 0

I noticed after I clicked ok within seconds the service was listed as "out of service"

DId I do the correct process to drain a service?
Question by:compdigit44
  • 4
  • 3
LVL 66

Expert Comment

ID: 40497614
A virtual server marked as DOWN happened likely when there is no one service bound to the vserver. it should not stay DOWN is there is service bound to vserver. Maybe can check further if "show vserver <VServer_Name>" can reveal any leads.
The understanding is also if existing connection is flushed e.g. Down state enabled, the Netscaler would try to re-transmit the packet to a different server. So the state should be reverted if different server is readily available during the retransmit.

We also need to consider this Down state is for vserver or server. for the vserver, both client and server links are applicable while for server, only server to vserver link is applicable. The down state flush option is enabled on the vserver by default, and it should flush the client side connections.

However, if the "Down State Flush" is unchecked (disabled), retransmit will not be done in state of DOWN. So, if client to server is "hang" and not timeout, there is no Netscalar doing retransmit. It should still remain as previous state which is likely not DOWN.

Also good to check support to see if this is expected.
LVL 20

Author Comment

ID: 40498023
I set the service(s) for the service I want to drain to "Disable Down State Flush by deselecting the check box and selecting a graceful shutdown.

From my understand by default Down State Flush is enabled and drops all connects when disabled removing this check box should not do this. Is my understanding correct.

The Vserver this server was a member up stayed up and was working fine. I am trying to understand why the service was marked out of service so fast or if I did something wrong..
LVL 66

Expert Comment

ID: 40498399
Yes it is by default enabled as also mentioned in my post. In fact, upon disabled state, it delays clean up of connections on that vserver if its's state is down. Note that that vserver state depends on the states of the services that are bound to it, the state of service is bound to its monitor. So (to be expected) the vserver is marked as DOWN only when all services bound to it are marked as DOWN. Check out the official standpoints
Disabling the Down State Flush feature changes this behavior; when the service is disabled all the in-flight connections are honored and no new connections are serviced by this service. If there is a persistent connection from the client, that also is not be honored.

The service can be disabled and set a timer (say 10 seconds), which indicates that the service honors all the existing connections including the persistent connections until the timer times out, and no new connections are honored. The Down State Flush starts after the timer times out.

Since you set those accordingly and even the timeout as 0, logically it should tear away and cleared associated TCP session table. Supposedly, some sort of 503 service unavailable is expected.

Most of the time, it is best to let the flag stay "enabled" unless otherwise due to slow network and impacting backend service effectively..
LVL 20

Author Comment

ID: 40498983
Thank you for your response..

Can you please explain what you mean by ..."Most of the time, it is best to let the flag stay "enabled" unless otherwise due to slow network and impacting backend service effectively"  Which flag are you referring to.

Maybe I am being dense here but are you stating that I did or did not follow the correct process to drain a service.... ;-) Long day at work.
LVL 66

Expert Comment

ID: 40499423
The "Enabled" is recommended by Citrix hence it is also default setting - in other words, let the box handle the connection rather than manual intervention. Of course, you can (and have) opted for graceful shutdown option, on top of flushing only, to also disable a service only when all the established connections are closed by the server or the client. See this for more details on the grace shutdown option

You have followed the steps no difference just that to clarify that the service DOWN has several consideration stated as in the kb and its posting, we have to consider that as well. If as based that there is no service bound and as per monitor, and no existing live session for the vserver, the moment it switched to "disabled",  all connections should be immediately reset. Moe specific details in (though in v9.3 but should be applicable for discussion sake)

not sure if there are any bugs if it shows otherwise..hence support to clarify instead
LVL 20

Author Comment

ID: 40500757
Good points...

So if I were to leave "Downstate FLush" enabled yet select. Graceful shutdown it should do the same thing...

Part me me feels safer to manually control this though.. Might be force of habit though.
LVL 66

Accepted Solution

btan earned 2000 total points
ID: 40501757
yes indeed. for info on graceful shutdown , reference to http://discussions.citrix.com/topic/284073-load-balancing-down-state-flush-question/
No Graceful: all connections will be dropped either immediately (setting = 0 secs) or after X seconds. New connections allowed until that time.
Graceful enabled: If the timeout is set to 0, then no new connections allowed, and all existing connections will continue until they have finished; if non-zero, then no new connections allowed, and existing connections will drop after X seconds.
Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

During and after that shift to cloud, one area that still poses a struggle for many organizations is what to do with their department file shares.
Tech spooks aren't just for those who are tech savvy, it also happens to those of us running a business. Check out the top tech spooks for business owners.
Here's a very brief overview of the methods PRTG Network Monitor (https://www.paessler.com/prtg) offers for monitoring bandwidth, to help you decide which methods you´d like to investigate in more detail.  The methods are covered in more detail in o…
In this video we outline the Physical Segments view of NetCrunch network monitor. By following this brief how-to video, you will be able to learn how NetCrunch visualizes your network, how granular is the information collected, as well as where to f…

591 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question