cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1478
Views
0
Helpful
3
Replies

TCL Script for multiple TCP ports

shday
Level 1
Level 1

    I have four serverfarms each assigned a tcp port range of 80 ports.  Farm one will answer requests on ports tcp 1-80, farm two will and requests on tcp port 81-160 and so on.  I need a TCL script that will check all the ports within the range for each farm and if one of the ports fails to respond then mark the rserver outofservice in the serverfarm.

I'm not a programmer so i could use some help. 

3 Replies 3

chrhiggi
Level 3
Level 3

Hello,

  If I understand what you are asking for, you are  going to have X amount of servers in a serverfarm and you want a probe  80 ports for each of these to check for the server being up?  What you  are asking for is not super complicated, but its dangerous in terms of  the amount of resources needed to run the probe. If you were to try to  open 80 connections at once, you can exhaust the amount of tcp ports  available to the system very easily (remember that any given probe can  be running while other probes are in process). If you had 10 Rserver per  farm, 10 farms, that is 8000 connections and ports in use at one time.  Just for these farms, assuming you have no other rservers being probed.  You run out of ports at 2000 connections...so that won't work.

If stagger the probes by opening a port one at a time  for 1-80, then the amount of time the probe is running becomes very  significant and it is very plausible you will start overlapping probes  when the server is under heavy load.

From the docs:

"The  ACE supports 4096 (ACE  module) or 1000 (ACE appliance) unique probe  configurations, which  includes ICMP, TCP, HTTP, and other predefined  health probes. The ACE  can execute only up to 200 concurrent script  probes at a time. The ACE  also allows the opening of 2048 sockets  simultaneously.

You can associate the same probe with  multiple real servers or server  farms. Each time that you use the same  probe again, the ACE counts it as  another probe instance. You can  allocate a maximum of 16 K (ACE module)  or 4000 (ACE appliance) probe  instances."

Given the 2 scenarios, I would choose the  2nd where you probe one at a  time.  However, I would not, and do not  endorse doing this at all, you  are likely going to destroy the probing  facility on the ACE when they all start overlapping, or if you have a  major network event where the majority of servers have issues.

Regards,

Chris Higgins

Ok, and understand your concerns.  Is there a better way to perform the probe that will allow me to check all the ports without any possible impact?  I have to be able to know that each port is available since that is how the clients request will be sent to the appropriate web instance on the server.

Unfortunately, no.  You could add a server that ACE would probe. That server would have a script running that does the probing to all ports for you, and returns some value to ACE if they failed that you could use to fail the rserver. However, by doing something like that, you are also adding a point of failure.

Something simpler like an icmp ping only tests basic connectivity, not application level/tcp stack level.

Chris

Review Cisco Networking for a $25 gift card