In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-18 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >
Share
Shulou(Shulou.com)06/02 Report--
This article mainly explains "how to achieve highly reliable load balancing and access speed through DNS". The content of the article is simple and clear, and it is easy to learn and understand. Please follow the editor's train of thought to study and learn "how to achieve highly reliable load balancing and access speed through DNS".
1. Introduction to DNS 1. A brief introduction
DNS (Domain Name System, domain name system), its main function is to resolve the host name into an ip address, and complete the conversion from the domain name to the host recognition ip address.
DNS is a distributed and hierarchical host name management architecture. By configuring the DNS server address, the host can access the Internet in the form of host name without knowing the corresponding ip address.
DNS uses a directory structure similar to an inverted tree to distribute the management of hostnames among different levels of DNS servers. After hierarchical management, each level of DNS server is responsible for part of the domain name information, which reduces the load of DNS servers and facilitates recording and updating synchronization.
DNS is a network service, so there is a corresponding port with a port number of 53. When DNS is queried, it is queried by udp, a faster transport protocol, but in case there is no way to query complete information, it will be re-queried by tcp protocol again. DNS service will open port 53 of tcp and port 53 of udp when starting.
DNS uses TCP protocol for regional transmission and UDP protocol for other times.
FQDN (Full Qualified Domain Name): the full hostname, which consists of a hostname and a domain name. For example, in www.baidu.com, www is the hostname of the web website server, and baidu.com is the domain name. The hostname and domain name are represented by a solid dot.
DNS is based on the Candace S architecture (most of which are based on the socket architecture). The limit for the length of each first-level domain name is 63 characters, and the total length of the domain name does not exceed 253 characters.
The DNS system records a lot of information, but there are only two key points: one is the NS (Name Server) identity where the record server is located, and the other is the A (Address) flag corresponding to the hostname.
2. Domain name structure of DNS
The domain name of DNS is an inverted tree structure, and at the top level is a root server, which is mainly responsible for the management of the top-level domain name.
First-level domain names are divided into three categories: organizational domain, country domain and echo domain, with a maximum of 127 domain names.
Each level of domain name server is only responsible for the management of subordinate domains, in which the root node is composed of 13 servers distributed around the world, of which 10 are located in the United States, and the other 3 are located in the United Kingdom, Sweden and Japan.
2. Working principle of DNS
There are three stages for DNS to resolve a domain name to IP:
Local DNS cache resolution.
Local DNS server parsing, recursive query.
Root domain and all levels of domain name server resolution, iterative query.
3. DNS load balancing
The implementation principle of DNS load balancing technology is that multiple IP addresses are configured for the same host name in the DNS server, and multiple IP addresses are selected by polling.
Operating system: Ubuntu 18.04
DNS server software: bind9
Install bind9.
Modify the nameserver.
# nameserver 127.0.0.53nameserver 192.168.3.101search localdomain
Edit the / etc/resolv.conf file.
Modify the DNS server address.
Zone "zp.com" {type master; file "/ etc/bind/db.zp.com";}
Edit the / etc/bind/named.conf.local file.
Modify the named.conf.options file.
Options {directory "/ var/cache/bind"; listen-on port 53 {127.0.0.0; 192.168.3.101;}; allow-transfer {none;};}
Modify the listen-on.
Create a / etc/bind/db.zp.com file.
$TTL 604800 @ IN SOA zp.com root.localhost. (1; serial 604800; refresh 1H; retry 1W; expire 3H); minimum @ IN NS localhostzp.com IN NS 192.168.3.101yes IN A 192.168.3.101yes IN A 192.168.3.102yes IN A 192.168.3.103
Restart bind9.
Service bind9 restart
Dig command parsing.
Dig yes.zp.com
4. Comparison between DNS and other load balancing tools
DNS load balancer:
The domain name of the same request is mapped to a different server IP address.
HTTP redirection:
After a HTTP agent, such as a browser, requests a url from the Web server, the Web server returns a new url based on the location tag in the http response header information, and then the http agent continues to request access to the new url.
Reverse proxy load balancing:
Reverse proxy means that the proxy server receives the connection request to the Web server, then forwards it to different Web servers in the internal network, and returns the result of the request from the Web server to the client requesting the connection, represented by Nginx.
NAT load balancer:
Map public network addresses to multiple private network addresses to solve the problem that IP addresses are tight and do not want the external network to know the internal network structure.
CDN:
CDN is Content Delivery Network, the content distribution network. Through the publishing mechanism, the content is synchronized to a large number of cache nodes, and extended on the DNS server to find the nearest cache node to the user as the content delivery node.
Hybrid load balancer:
In some large networks, due to the differences in hardware equipment, respective size, and services provided within multiple server farms, we can consider adopting the most appropriate load balancing method for each server farm, and then load balancing or clustering among these server farms to provide services to the outside world as a whole (that is, taking multiple server farms as a new server farm), so as to achieve the best performance.
Thank you for your reading. The above is the content of "how to achieve highly reliable load balancing and access acceleration through DNS". After the study of this article, I believe you have a deeper understanding of how to achieve highly reliable load balancing and access acceleration through DNS, and the specific usage needs to be verified in practice. Here is, the editor will push for you more related knowledge points of the article, welcome to follow!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.