Forum Discussion
Mohammed_M_Irfa
Nimbostratus
Oct 04, 2018How to view Pool Member UP/DOWN time via CLI interface
Hi Folk,
Can any one share the command to view the down time of Pool member and Nodes.
Nat_Thirasuttakorn
Employee
Apr 17, 2012Hi Vincent,
(1) When there are no active members in the pool (all backend nodes are down), how can I close the client connection?
you may try this way...
note that return value of active_members may not be the same as number of current active connection for the particular client connection.
you could keep track that by using variable. here are 2 examples
example I
when CLIENT_ACCEPTED {
check every second
after 1000 -periodic {
if { [active_members [LB::server pool]] == 0 } {
reject
log local0. "TCP connection closed to [TCP::local_port]."
}
}
}
example II
when CLIENT_ACCEPTED {
array set server_array {}
check every second
after 2000 -periodic {
if { [array size server_array] == 0 } {
reject
log local0. "TCP connection closed to [TCP::local_port]."
}
}
}
when SERVER_CONNECTED {
set s "[IP::remote_addr] [TCP::remote_port]"
set server_array($s) 1
}
when SERVER_CLOSED {
set s "[IP::remote_addr] [TCP::remote_port]"
unset server_array($s)
}
(2) to periodically send somethig to server every 30 seconds, you can do as follow
when SERVER_CONNECTED {
send ping every 30 seconds
after 30000 -periodic {
you could add some code to check idletime here...
TCP::respond $static::conn_ping
}
}
May I ask what is your use case that you are using mblb profile for?
This information would help us improve future version of mblb profile 🙂
Thanks,
Nat
v
requirement slight different now
anyone trying to access https://1.1.1.1 should redirect to https:/abc.com
client should not able browser url with IP address
thanks
Snl