Scheduling DNS servers
Perform this task to specify a scheduling algorithm for a DNS server pool and specify the number of DNS servers to participate in scheduling. The LB device calculates the DNS servers to process DNS requests based on the following scheduling algorithms:
Source IP address hash algorithm—Hashes the source IP address of DNS requests and distributes DNS requests to different DNS servers according to the hash values. This hash algorithm ensures that DNS requests with the same source IP address are distributed to the same DNS server.
Source IP address and port hash algorithm—Hashes the source IP address and port number of DNS requests and distributes DNS requests to different DNS servers according to the hash values. This hash algorithm ensures that DNS requests with the same source IP address and port number are distributed to the same DNS server.
Destination IP address hash algorithm—Hashes the destination IP address of DNS requests and distributes DNS requests to different DNS servers according to the hash values. This hash algorithm ensures that DNS requests with the same destination IP address are distributed to the same DNS server.
Random algorithm—Distributes DNS requests to DNS servers randomly.
Weighted round-robin algorithm—Distributes DNS requests to DNS servers in a round-robin manner according to the weights of DNS servers. For example, you can assign weight values 2 and 1 to DNS server A and DNS server B, respectively. This algorithm distributes two DNS requests to DNS server A and then distributes one DNS request to DNS server B. This algorithm applies to scenarios where DNS servers have different performance and bear similar load for each session.
Bandwidth algorithm—Distributes DNS requests to DNS servers according to the weights and remaining bandwidths of DNS servers. When the remaining bandwidths of two DNS servers are the same, this algorithm is equivalent to the round-robin algorithm. When the weights of two DNS servers are the same, this algorithm always distributes DNS requests to the DNS server that has larger remaining bandwidth.
Maximum bandwidth algorithm—Distributes DNS requests always to an idle DNS server that has the largest bandwidth.
To schedule DNS servers:
Step | Command | Remarks |
---|---|---|
1. Enter system view. | system-view | N/A |
2. Enter DNS server pool view. | loadbalance dns-server-pool pool-name | N/A |
3. Specify a scheduling algorithm for the DNS server pool. | predictor hash address { destination | source | source-ip-port } [ mask mask-length ] [ prefix prefix-length ] predictor { random | round-robin | { bandwidth | max-bandwidth } [ inbound | outbound ] } | By default, the scheduling algorithm for a DNS server pool is weighted round robin. |
4. Specify the number of DNS servers to participate in scheduling. | selected-server min min-number max max-number | By default, the DNS servers with the highest priority participate in scheduling. |