Solved

Netscaler 10 Draining a Service

Posted on 2014-12-09
  • Citrix
  • Networking
  • Routers
  • Networking Hardware-Other
  • Hardware Firewalls
  • +1
7
935 Views
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?
0
Comment
Question by:compdigit44
  • 4
  • 3
7 Comments
 
LVL 61

Expert Comment

by:btan
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.
0
 
LVL 19

Author Comment

by:compdigit44
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..
0
 
LVL 61

Expert Comment

by:btan
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.
http://support.citrix.com/article/CTX124710

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..
0
Netscaler Common Configuration How To guides

If you use NetScaler you will want to see these guides. The NetScaler How To Guides show administrators how to get NetScaler up and configured by providing instructions for common scenarios and some not so common ones.

 
LVL 19

Author Comment

by:compdigit44
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.
0
 
LVL 61

Expert Comment

by:btan
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
http://support.citrix.com/proddocs/topic/netscaler-load-balancing-93/ns-lb-clienttraffic-gracefulshutdown-tsk.html

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)
http://support.citrix.com/proddocs/topic/netscaler-load-balancing-93/ns-lb-clienttraffic-downstateflush-tsk.html#ns-lb-clienttraffic-downstateflush-tsk

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

Author Comment

by:compdigit44
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.
0
 
LVL 61

Accepted Solution

by:
btan earned 500 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.
0

Join & Write a Comment

#Citrix #XenApp #Citrix Scout #Citrix Insight Services #Microsoft VMMAP #Microsoft ADEXPLORE #Microsoft RAMMAP #Microsoft TCPVIEW #Microsoft AUTORUNS #Microsoft PROCESS EXPLORER #Microsoft PROCESS MONITOR
This article offers some helpful and general tips for safe browsing and online shopping. It offers simple and manageable procedures that help to ensure the safety of one's personal information and the security of any devices.
After creating this article (http://www.experts-exchange.com/articles/23699/Setup-Mikrotik-routers-with-OSPF.html), I decided to make a video (no audio) to show you how to configure the routers and run some trace routes and pings between the 7 sites…
After creating this article (http://www.experts-exchange.com/articles/23699/Setup-Mikrotik-routers-with-OSPF.html), I decided to make a video (no audio) to show you how to configure the routers and run some trace routes and pings between the 7 sites…

757 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

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now