What is Topological Selection; how does GTM determine the client's location?
Short answer
Topological Selection is the selection that separates a record's addresses according to the network and location the query comes from. When it is marked in the record form, each address is given a rule in the Topology column of the Record / HC table (Always, Network, Country, Continent or ASN; reversed with Negate), and at query time the DNS Service answers with the addresses whose location matches the rule. The query usually comes not from the client but from the resolver it uses; for this reason, the answer can be given according to the resolver's network and location. The rules are applied only among the healthy candidates; the fact that no rule matches does not bring Fail-Safe Records into play.
How Does It Work?
- Health and mode come first: The topology rules are applied only to the addresses that pass health filtering and the operating mode (record resolution logic).
- Location matching is done at query time: The same record answers queries coming from different networks with different addresses.
- The algorithm is applied to the matching addresses: The record's Balance Algorithm value makes the selection among the matching addresses.
| Rule (Type) | What it is compared with |
|---|---|
| Always | No rule; it matches every query (default). |
| Network | The entered IP/CIDR list (Network list). |
| Country | The selected countries. |
| Continent | The selected continents (Africa, Antarctica, Asia, Europe, North America, Oceania, South America). |
| ASN | The selected autonomous system numbers. |
While Negate is on, the rule means "those that do not meet this criterion"; in the cell, ≠ appears at the end of the type (e.g. Country(2)≠).
Topological Selection in TR7
- When the Topological Selection box in the record form (default off) is turned on, the Topology column is added to the Record / HC table; the rule is built in the window in the cell by selecting Type and a value according to the type.
- The selection is used in all three operating modes. In Datacenter mode, the topology rules are not applied while DC Selection is Client Based; this source itself sorts the data centers according to the client.
- If none of the domain's data center groups is under Local Management (Express only), the box is locked.
- On a record with topology on, the phrase Topological Selection is added to the Record Behavior row in the record preview.
Common Misconceptions
- "GTM always sees the end user's IP." GTM usually receives the query from the resolver the client uses; clients that use a corporate or public resolver can get an answer according to the network and location where the resolver is located (What is the difference between an authoritative DNS server and a recursive resolver?).
- "If no rule matches, the fail-safe addresses are returned." Fail-Safe Records are used only when no healthy candidate address remains; a rule not matching does not trigger fail-safe. An address whose rule is Always is used as the general answer because it matches every query.
- "Topological Selection and Geographic Proximity are the same." Geographic Proximity is a Balance Algorithm option and selects the closest address without defining rules; topology, on the other hand, works with the rules the administrator writes (Which distribution algorithms are available between several addresses in a record?).
- "Topology also returns an unhealthy address." If the address that matches the rule is unhealthy, it is not included in the answer.
How it is done in the documentation
Related questions
- Which distribution algorithms are available between several addresses in a record?
- How is traffic distributed across data centers in Datacenter mode?
- What are the limits of DNS-based routing; how do TTL and the resolver cache affect the decision?
- What is the difference between an authoritative DNS server and a recursive resolver?
