How to Set Up DNS Load Balancing on VergeCloud for Efficient Website Traffic Management

DNS Load Balancing

The VergeCloud DNS Load Balancer allows you to distribute incoming traffic for your domain or subdomains across multiple servers. This distribution can be configured based on the weight of each server, type of response, or the geographic location of the user, providing enhanced reliability and optimal performance.

What is a DNS Load Balancer?

A DNS Load Balancer is a tool that helps in spreading the incoming requests to your domain across multiple servers. This feature enhances redundancy and ensures that no individual server is overloaded, which improves the overall availability and response time of your website.

Steps to Enable DNS Load Balancer

  1. Navigate to the VergeCloud user panel and select the domain where you wish to configure load balancing.
  2. Go to the DNS Records section and create a new A Record or AAAA Record.
  3. In the Name field, specify the hostname (subdomain) for which you want to set up load balancing. Use @ for the root domain or enter the specific subdomain name if applicable.
  4. Provide the IP addresses of the servers in the Value field. For enabling load balancing, you need click "Add New Value" to enter origin IPs to distribute the traffic among those servers.
  5. In the Response Type section, specify whether you want the DNS to respond with a single IP or multiple IP addresses when resolving the domain.
  6. Under Load Balancing Method, select the traffic distribution approach:
    • Round-Robin: Traffic is distributed in a sequential, cyclical manner.
    • Weighted Distribution: Traffic is distributed based on the weight assigned to each server.
  7. Weight Configuration: Assign weight values to each server to define how traffic is divided. The ratio between weights is important, not the specific value. For example, weights of 1 and 2 are equivalent to weights of 10 and 20.
  8. Enable Geographic Load Balancing to distribute traffic based on the user's location. Select the desired country for each IP address.
  9. Click Save to apply the settings.

Understanding Key Fields in Load Balancer Configuration
  • Name Field: Indicates the hostname or subdomain where load balancing should be applied. Use @ for the root domain, or specify the subdomain name.
  • Value Field: Provide the IP addresses of the servers. Multiple IPs allow you to distribute the incoming requests among different servers.
  • Response Type: Specify whether the DNS should return one or more IP addresses when the domain is queried. Returning multiple IPs can improve redundancy.
  • Load Balancing Method: Select the distribution method for the incoming traffic:
    • Round-Robin: Each server is assigned an equal opportunity to handle requests, regardless of the traffic load.
    • Weighted Distribution: Servers receive requests based on their assigned weights, with higher weights indicating a larger share of the traffic.
  • Weight Configuration: Set the weight of each server to determine its share of the traffic. Only the ratio between the weights matters, allowing for flexibility in configuration.
  • Geographic Load Balancing: Assign users to specific servers based on their geographic location to reduce latency and improve user experience.

Testing DNS Load Balancer Configuration

After setting up your DNS Load Balancer, it's essential to verify the configuration. Use the dig command to ensure your DNS records are resolving as expected:

  1. dig A example.com

Sample Test Output

  1. ; <<>> DiG 9.16.1-Ubuntu <<>> A example.com ;; global options: +cmd ;; Got answer: ;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 12345 ;; flags: qr rd ra; QUERY: 1, ANSWER: 3, AUTHORITY: 0, ADDITIONAL: 0 ;; QUESTION SECTION: ;example.com. IN A ;; ANSWER SECTION: example.com. 120 IN A 192.168.1.1 example.com. 120 IN A 192.168.1.2 example.com. 120 IN A 192.168.1.3 ;; Query time: 27 msec ;; SERVER: 8.8.8.8#53(8.8.8.8) ;; WHEN: Thu Sep 26 15:10:12 UTC 2024 ;; MSG SIZE rcvd: 100

Considerations for DNS Load Balancer

  • Use weighted distribution to accommodate servers with different capacities, ensuring more powerful servers receive more traffic.
  • Geographic load balancing helps deliver content from the closest server, reducing latency for end users.
  • Allow up to 48 hours for DNS changes, including load balancer configuration, to propagate across the internet.


    • Related Articles

    • Load Balancing

      Overview VergeCloud’s Load Balancer is designed to intelligently manage and distribute incoming traffic across multiple origin servers. This ensures high availability, stable performance, and consistently low response times for users across different ...
    • DNS Setup

      Overview When you change your domain’s Nameservers (NS) to VergeCloud, your domain becomes active on VergeCloud DNS. From this point forward, all DNS records must be added and managed through the VergeCloud dashboard to ensure your domain and ...
    • DNS Cloud Option

      Overview After migrating your website to VergeCloud and completing the necessary DNS configurations, you can view and manage DNS Records for your domain and its subdomains directly from the DNS Records section within the VergeCloud dashboard. This ...
    • DNS Zone File

      Overview In the architecture of DNS, a Zone represents the administrative domain of control for a domain and its sub-domains. Essentially, a DNS Zone acts as a container for all the records related to a particular domain, such as A, CNAME, MX, and ...
    • Using Layer 4 Network on VergeCloud

      Overview The VergeCloud Layer 4 Proxy enhances security and performance for applications using TCP protocol. It is ideal for non-HTTP traffic such as email, FTP, SSH, VoIP, or gaming. By proxying connections through VergeCloud’s edge, your origin ...