Gcore's DNS server can provide different DNS responses to different users. For example, you can specify that particular records will be delivered to users in Asia versus users in Europe, or choose the weight for the records, i.e., the probability with which they will be shown in the responses. This is called dynamic response. Depending on which parameter is used to select which record will be shown, it may also be referred to as weight balancing, traffic steering, GeoDNS, or failover.
Pickers are used to control dynamic responses. They determine in what order the DNS query data will be checked and compared with the metadata set for the particular record.
Dynamic response makes the RRSet dynamic. You can add several records and determine which one will be in DNS responses depending on how the query meets the established criteria (e.g., user’s subnet or ASN, geo metadata, etc.)
Dynamic response setup consists of two stages:
For example, you can set the “Continent” picker and add metadata of the “continent” type with the value “Africa”. The result is that the record will only be retrieved for users located in Africa.
1. Create a DNS record set in the advanced mode (steps 1–4.)
2. Enable the Dynamic response toggle.
3. Select a picker preset from the "Presets" buttons or manually choose pickers from the list on the right. The order of the pickers in the left list dicatate priority: the top picker will be considered first, the second picker considered second, and so on.
Presets are editable: You can select a preset and then change the position of pickers or add/remove pickers manually.
The following pickers are available:
The First N option is also in the list of pickers. It controls the maximum number of records used per response and is added to each preset. The default value is 1.
Adjust pickers as follows:
4. Specify the record’s value.
5. Set appropriate metadata to which the value in the query will be compared and specify the value. You can add several metadata fields for one value by clicking the plus button.
Ten metadata types are available:
6. Click Add record to add several records to your response and repeat steps 4 and 5.
7. Click Create.
That's it. You've configured dynamic response for your DNSset.
With the “Geo DNS” preset, you can add metadata of different types to each record.
The latlong and weight metadata will be ignored if you don’t add the corresponding pickers from the list.
When a DNS request is made, the response will be formed using the chosen "Records selection" option and metadata specified for records.
Our system will check if a user matches the criteria from the metadata in the following order: IP, ASN, country, and continent. The processing logic works like this:
Example: You selected the “Geo DNS” preset, specified one record per response in the First N.
Then, you added two records with IP metadata:
10.0.0.0
record, subnet 192.168.1.0/2410.0.0.1
record, subnet 192.0.2.0/24If a user with the IP from the subnet 192.168.1.0/24 requests the domain, the record with the value 10.0.0.0
will be returned. If the requestor’s subnet is 192.0.2.0/24, the 10.0.0.1
record will be returned.
With the “Geo distance” preset, you instruct resolvers to analyze the proximity of the geolocation of the request to the latlong (latitude and longitude) specified in the record’s metadata when a record is requested. Users will receive the record with the nearest coordinates when they request your domain.
Example. You selected the “Geo distance” preset and specified one record per response in the First N.
Then, you added two records with the following coordinates:
10.0.0.0
record, latlong 51.52318152049715/-0.13458412218999416 (central London)10.0.0.1
record, latlong 48.859741241898114/2.3415648470109653 (central Paris)A user closer to the coordinate 51.52318152049715/-0.13458412218999416 (central London) will receive an A record with the value 10.0.0.0
, while a user nearer to 48.859741241898114/2.3415648470109653 (central Paris) will receive an A record with the value 10.0.0.1
.
With the “Weighted shuffle” preset, you can manage the probability of having a particular record in the answer by specifying its weight.
If the metadata field “weight” is left empty, the default value 50, 33.3, 25, and etc. is used. This means each record has equal probability.
Probability is calculated only if the value of First N exceeds the number of resource records. For a record R1 from RRset with weight W1, its probability(P1) is calculated as its weight divided by the sum of the weights of all other records.
Example. You enabled the “Weighted shuffle” preset and specified max one record per response in the First N:
Metadata was specified as follows:
Over the course of 300 answers, each record will appear with the following frequency:
~180
responses with the record 1.2.3.4
(weight 90)~20
responses with the record 4.5.6.7
(weight 10)~100
responses with the record 7.8.9.0
(weight 50)Was this article helpful?
Learn more about our DNS hosting