How MOM loadbalancer works? How it considers collectors for agent while selecting a collector for the agent?
All the below does not happen in the exact order as described, but this is an overview how it works.
Check 1 - loadbalancing.xml conditions
- If collector is explicitly excluded in loadbalancing.xml, don't consider the collector
- If collector is not explicitly excluded
- If introscope.apm.agentcontrol.agent.allowed=true, consider the collector
- If introscope.apm.agentcontrol.agent.allowed=false
- If agent is explicitly included in lb.xml, consider collector
- If agent is not explicitly included, don't consider collector
If collector is considered in Check 1, proceed with Check 2 - clamp conditions:
- If collector has any of the two clamps hit, don't consider collector
- Agent connection limit clamp(50 by default)
- Agent metric limit clamp(live or historic)
- Live metric clamp is 0.5 million by default
- Historic metric clamp is 1.2 million by default
If collector passes Check 2, proceed Check 3: Socket Type
- Does collector support the socket type of the agent?
- By default, EM always has Isengard channel ON, so Isengard agents never fail this check
- If agent communicates using HTTP and collector does not have HTTP channel turned ON, collector is not considered.(MOM can have HTTP channel turned ON). Also true for HTTPS.
After these 3 main checks are performed, we have a list of potential collectors the agent can be connected to:
- Check if the agent is "latched" to any of the collectors. If yes, that collector is selected, end of story.
- If there are no latches, then we try to see if the agent has history with any of the collectors.
- If yes, we assign the agent to that collector.
- If agent has history with multiple collectors, we try to assign to the least loaded collector.
If agent has no history with any of the collectors, then we select the least loaded collector.