Get the App
SLTechnology News&Howtos  ›  Servers  › 

The method of pointing a domain name to multiple ip

Shulou Source: shulou.com Published: 2022-06-02 00:28:09 11月14日 Update

Editor to share with you the method of a domain name pointing to multiple ip, I believe that most people do not know much about it, so share this article for your reference, I hope you will learn a lot after reading this article, let's learn about it!

1. Domain name resolution with multiple ip instances

Simple sentence: add several more A records of different IP when dns parsing

For example:

In the picture above, I resolved the domain name to two different ip. After about ten minutes, we ping the result as follows.

You can see that one domain name has been resolved to multiple ip.

Another note: in figure 1, there is a line that is not filled in, so it is the default, you can customize to assign different ip to different lines.

2. DNS analysis schematic diagram of load balancing

DNS will return a different ip address according to the load balancing algorithm for each domain name request.

Third, the advantages and disadvantages of load balancing DNS parsing.

Advantages:

The configuration is simple, and there is no cost to hand over the load balancing work to the DNS server, which saves the trouble of management.

Disadvantages:

The addition and modification of records take some time to take effect (because DNS caches A records). Once a server goes down, it will take a long time to make it effective even if the A record is modified. During this period, DNS will still resolve the domain name to the offline server, resulting in user access failure. The load cannot be distributed according to demand, and DNS does not know the real load of each server, so the load effect is not very good.

The actual situation:

In the actual project deployment, we usually use DNS resolution on some servers and domain name resolution as the first-level load balancing. Then use NGINX load balancing as the second-level load balancing in the server.

The above is all the contents of the method of one domain name pointing to multiple ip, thank you for reading! I believe we all have a certain understanding, hope to share the content to help you, if you want to learn more knowledge, welcome to follow the industry information channel!

Tags: Domain name balance server service different multiple time pointing method offline content actual situation article line distribution on demand one sentence picture above not much two Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Shulou Information Microsoft Huawei Xiaomi vpn