Scaleway Domains and DNS provides advanced features for traffic management using your DNS zone. It allows you to redirect users based on their geolocation, the load on your different servers, and more.
You provide a list of IPs with their corresponding “weights”. These weights are used to proportionally direct requests to each IP. Depending on the weight of a record, more or fewer requests are answered with its related IP compared to the others in the list.
Example
Your website runs on a large server and has a smaller companion to provide more resources. You can configure the list so that DNS will answer with the IP address of the main server 90% of the time, and with the IP address of the secondary server 10% of the time. With a list of coupled IP/weights, depending on the “weight”, IPs with heavier weights will answer more requests than those with lighter weights.
Limitations
This record type is only available for A and AAAA records.
The Geo IP feature provides DNS resolution, based on the user’s geographical location. You can define a default IP which resolves if no Geo IP rule matches, and specify IPs for each geographical zone.
Example
Your website has two servers: one in Europe and one in Asia, and its visitor base spans both continents. DNS replies to requests from visitors in Asia with the IP address of the server located in Asia, and to requests from visitors in Europe with the IP address of the server located in Europe. This reduces network latency and makes your website faster.
Limitations
This record type is only available for A, AAAA, CNAME and ALIAS records.
The DNS service performs health checks as follows:
You define a list of IPs (a pool) reachable via a single URL.
The servers in the IP pool are contacted by their IP, and an HTTP GET request is sent to each, with the URL as a parameter.
Each IP passes the health check if it sends a response which includes a predefined string.
Having established the ‘healthy’ IPs, the DNS service responds to requests using one of the following strategies:
Random: It sends a random healthy IP.
Hashed: It uses the caller’s IP address to send a specific random healthy IP, which will always be returned for this caller IP.
All: It sends all healthy IPs in a random order.
If none of the addresses in the IP list has passed the health check, it sends a fallback IP.
Note
The following table shows more explicitly how the results of the IP health check determine the single IP address that the DNS service will send:
IP list health check
Fallback IP check
Response
All or some IPs OK
n/a
A healthy IP from the list
No IPs OK
OK
The fallback IP
No IPs OK
not OK
An IP from the IP list OR the fallback IP
The following values should be provided to use the DNS health check service:
Fallback IP: The fallback IP address to return if all health checks fail.
URL: A (common) URL to use in GET (e.g. http://example.com/healthcheck).
Data: The string to look for in the GET result (e.g. IamHealthy).
Response strategy: The strategy to use. It can either be random or hashed.
Random: A random IP from the pool of healthy IPs is returned upon each request.
Hashed: The same (random) IP, from the pool of healthy IPs is always returned to the same caller IP.
All: All IPs from the pool of healthy IPs are returned in a random order.
IPs: A list of IPs to test during the check (e.g. 1.2.3.4, 2.3.4.5).
Example
A website relies on different servers and maintenance is planned on one of them. To plan the maintenance, an endpoint is configured to fail over one hour before and during the planned period, so requests will not be forwarded to the impacted server.
Limitations
This record type is only available for A and AAAA records.
The answer to a DNS request is based on the client’s (resolver’s) subnet.
Example
A website has a public version with a public IP. A specific version for employees exists on an intranet. To use the same domain name for both versions, the Intranet IP will be answered if the DNS resolution is requested from the Intranet subnet, while for any other requests the DNS request will resolve to the public IP address.
Limitations
This record type is only available for A, AAAA, CNAME and ALIAS records.