Based on your specific use case and requirements, the possible connectivity schemes for Environment ActiveGates, Cluster ActiveGates, OneAgents, and Dynatrace Server are depicted below.
In general, an ActiveGate is preferred if it's considered to be "closer" to the sender (i.e., OneAgent or another ActiveGate) in terms of the following hierarchy:
Dynatrace Server < Cluster ActiveGate < Environment ActiveGate
|Dynatrace Server||Low||This is the default setup and fallback option. Dynatrace server is considered to be "far away" from OneAgents and other ActiveGates.|
|Cluster ActiveGate||Medium||This is typically used as an entry point in case the cluster isn't directly reachable. Therefore, this is preferred over Dynatrace Server.|
|Environment ActiveGate||High||The idea behind an Environment ActiveGate is to install it as close to OneAgents as possible. Therefore, it is considered to be the "closest" ActiveGate.|
ActiveGates of higher priority can generally send data to ActiveGates that have lower priority, but not vice versa. ActiveGates can't send data to other ActiveGates of the same priority. An Environment ActiveGate will always connect to a Cluster ActiveGate if one exists and is reachable.
If an ActiveGate isn't reachable, OneAgents will try to contact other ActiveGates. OneAgents will always prefer ActiveGates of the highest available priority as long as at least one of them is reachable. If more than one such ActiveGate is available, OneAgents will try to switch between the available ActiveGates on a regular basis to achieve proper load balancing.
If all ActiveGates of the highest priority are temporarily unreachable, OneAgents will switch to the next lower priority ActiveGates and continue checking in the background for availability of higher priority ActiveGates.