Forum Discussion
Can we make status of virtual server to depend on number of nodes down ???
Hi All,
I have a virtual server VS1 configured with 10 pool members on LTM1 of datacenter DC1 and another virtual server VS2 with 10 pool members on LTM2 of another datacenter DC2. Both of these VS1, VS2 are load balanced on GTM, but at any given time VS1 would process the request. VS2 would process requests only incase VS1 is not reachable or down on LTM1 level. In perfect working conditions both VS1, VS2 would be available.
Now, the requirement is that VS1 should go down whenever more than 3 of its pool members are down so that at the GTM level VS1 would be down and therefore all the traffic would be processed by VS2.
I have two questions for this requirements :
-
How to make VS1 automatically go down when more than 3 of its pool members are down ??. Because, from my understanding VS1 would be down only when all of its pool members are down.
-
What type of load balancing need to be configured on GTM level so that at normal conditions both VS1 & VS2 both would be online but all the traffic is processed by VS1.
Can anyone review my requirement and suggest some solutions. Please let me know if the requirement is not clear.
Thanks in advance,
MSK
1 Reply
- Jinshu
Cirrus
Hi buddy,
-
Use the below script to monitor the availability. This needs to customise according to your requirements. Copy the script to the F5 big ip devices and attach to the specific pool.
!/bin/sh pidfile="/var/run/$MONITOR_NAME.$1..$2.pid" Send signal to the process group to kill our former self and any children as external monitors are run with SIGHUP blocked if [ -f $pidfile ] then kill -9 -`cat $pidfile` > /dev/null 2>&1 fi echo "$$" > $pidfile minup=2 upmembers=`tmsh show /ltm pool <> members members |grep "Current Active Members" |awk -F" : " '{ print $2 }'` if [ $upmembers -ge $minup ] then rm -f $pidfile state=`tmsh show /ltm virtual <> |grep "State" |awk -F" : " '{ print $2 }'` if [ $state == "disabled" ] then logger -p local0.info -t MONITOR-ALERT "Pool <> members Monitor UP - enabling virtual <>" tmsh modify /ltm virtual <> enabled fi echo "up" else rm -f $pidfile state=`tmsh show /ltm virtual <> |grep "State" |awk -F" : " '{ print $2 }'` if [ $state == "enabled" ] then logger -p local0.info -t MONITOR-ALERT "Pool $pool Monitor DOWN - disabling virtual $virtual" tmsh modify /ltm virtual <> disabled fi echo "up" fi -
Use GTM global availability lb method. This will make sure that pool members are in Active/Passive method.
Let me know if you need any more info.
-JINSHU
-
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)Recent Discussions
Related Content
* Getting Started on DevCentral
* Community Guidelines
* Community Terms of Use / EULA
* Community Ranking Explained
* Community Resources
* Contact the DevCentral Team
* Update MFA on account.f5.com