Dynamic response
Dynamic response is a CDB DNS feature that delivers different records to different clients based on configured criteria. Depending on the parameter used — geolocation, ASN, subnet, or weight — the feature is also referred to as weight balancing, traffic steering, GeoDNS, or failover.
Dynamic response overview
Pickers are rule sets that determine how the DNS server chooses which record to return for each query. They control dynamic responses by checking DNS query data against the metadata set for each record, in the order configured.
Dynamic response makes the RRSet dynamic. Multiple records can be added to determine which one appears in DNS responses, based on criteria — user subnet, ASN, geolocation metadata, or others.
Dynamic response setup consists of two stages:
- Set the metadata or other data types against which the query parameters will be compared.
- Select pickers to define the sequence in which the resolver compares query data against the metadata or other criteria of the record.
Setting the "Continent" picker and adding metadata of the "continent" type with the value "Africa" limits the record to users located in Africa.
Configure dynamic response
- 1
Create a record set
Create a DNS record set in advanced mode (steps 1–4).
- 2
Enable the Dynamic response toggle
- 3
Select pickers
Select a picker preset from the "Presets" buttons or manually select pickers from the list on the right. The order of pickers in the left list determines priority: the topmost picker is checked first.
Presets are editable: select a preset and then change the position of pickers or add/remove pickers manually.
Adjust pickers as follows:
- To raise or lower a picker, use drag and drop.
- To remove a picker, click the cross.
- To remove all selected pickers, click Clear.

- 4
Specify the record value
- 5
Set metadata
Set the appropriate metadata against which the query value will be compared and specify the value. Multiple metadata fields can be added for one value by clicking the plus button.
- 6
Add more records (optional)
Click Add record to add more records and repeat steps 4 and 5.
- 7
Save the configuration
Click Create.
Examples of preset settings
With the "Geo DNS" preset, metadata of different types can be added to each record.
The latlong and weight metadata are ignored if the corresponding pickers are not added from the list.
When a DNS request is made, the response is formed using the selected "Records selection" option and the metadata specified for records.
The system checks whether a client matches the criteria from the metadata in the following order: IP, ASN, country, and continent. The processing logic works like this:
- CDB's DNS server receives a request to the domain.
- If Health Checks are configured, all "non-healthy" records are filtered out.
- CDB's DNS server compares the requestor's IP (respecting EDNS(0)) with the IP from the metadata. Records with matching metadata are used to form an answer if possible.
- If no matches are found, the ASN meta is considered as in step 3.
- If no matches are found, the country meta is considered as in step 3.
- If no matches are found, the continent meta is considered as in step 3.
- If no matches are found, the region meta is considered as in step 3.
- If no matches are found, the records with "fallback=true" metadata are considered.
- If no matches are found, all records are used in the answer (respecting the max answers value).
Example: The "Geo DNS" preset is selected with one record per response in the First N.

Two records are added with IP metadata:
- For
10.0.0.0record, subnet 192.168.1.0/24 - For
10.0.0.1record, subnet 192.0.2.0/24

A client with an IP from subnet 192.168.1.0/24 receives the record 10.0.0.0. A client from subnet 192.0.2.0/24 receives the record 10.0.0.1.



