Make LB decision based on application data
Any ideas on how I can configure LTM to make LB decisions based on application data such as an HTTP page that returns the number of application sessions on each pool member?
I need to load balance an app so we can keep licensing costs down (same 50 user license applied to 3 servers), but 'user sessions' do not correlate to number of active TCP connections on the pool members. The client side application establishes very short-lived TCP connections that make API calls to the server. It is not uncommon for the server with a dozen user sessions to no active TCP connections. It really just depends on user activity. The app also requires persistence because it only authenticates during the initial connection.
I was thinking if my Dev team could publish a page in their app that lists the number of user sessions associated with each server, then the LB could possibly select the server with the least number of user sessions. I'm concerned that this would be pretty inefficient if it had to make an HTTP call for every new TCP connection that didn't already have a persistence record. Anyway it could periodically call this page and store the results in a table?
Sanitized Configltm pool App-Pool {
load-balancing-mode least-connections-member
members {
192.168.10.100:http {
address 192.168.10.100
}
192.168.10.110:http {
address 192.168.10.110
}
192.168.10.120:http {
address 192.168.10.120
}
}
monitor http
}
ltm virtual App-VS {
destination 192.168.1.100:http
ip-protocol tcp
mask 255.255.255.255
persist {
source_addr_36000 {
default yes
}
}
pool App-Pool
profiles {
http { }
tcp { }
}
source 0.0.0.0/0
source-address-translation {
type automap
}
}