当前位置:网站首页>What can DNS do besides resolving domain names?
What can DNS do besides resolving domain names?
2020-11-09 12:53:00 【osc_fge5j3lp】
One http request , What is the typical execution process ?

You can see , The typical process is :
(1) Client request dns-server, Initiate domain name resolution ;
(2)dns-server Return the Internet corresponding to the domain name ip(1.2.3.4);
(3) Client through the Internet ip(1.2.3.4), Access reverse proxy ;
(4) Reverse proxy through intranet ip(192.168.x.x), Distribute requests to web-server;
(5)web-server The request is processed ;
among , The first step , Convert the domain name to ip The process of , It happens outside the application system , It's through DNS Realized .
Besides domain name resolution , In architecture design , Can also use DNS What do you do ?
One 、 Users visit nearby

DNS Can achieve , The nearest access to the resources the user needs :
(1) Telecom users want to access a server resource ;
(2) Browser direction dns-server Initiate domain name resolution request ;
(3)dns-server Identify the visitor as a telecom user ;
(4)dns-server Will the telecom room nginx Extranet ip Back to the visitor ;
(5) Visitors visit nearby ;
According to the user ip To return to the nearest server ip, be called “ intelligence DNS”,CDN And the most commonly used in multi machine room and multi living .
Two 、 Reverse agent horizontal expansion

In a typical Internet Architecture , By increasing web-server To expand web Layer performance , But reverse proxy nginx It's still the only access to the whole system , If the system throughput exceeds nginx Performance limit of , Difficult to expand , At this point, we need dns-server With horizontal expansion .
The specific way is : stay dns-server For the same domain name, you can configure multiple nginx The Internet ip, Every time DNS Resolve request , Polling returns different ip, In this way... Can be achieved nginx Horizontal expansion of , This method is called “DNS polling ”.
3、 ... and 、web-server Load balancing

since “dns polling ” The traffic of the same domain name can be evenly distributed to different nginx, Then it can also be used to do web-server Load balancing of :
(1) Remove... From the architecture nginx layer ;
(2) Will be multiple web-server The Intranet ip Change to the Internet directly ip;
(3) stay dns-server The Internet corresponding to the domain name ip Polling resolution ;
adopt DNS What are the advantages and disadvantages of load balancing ?
advantage :
(1) Leverage third parties DNS The implementation of , There is no need to move the server architecture ;
(2) A layer of network requests is missing ;
Insufficient :
(1)DNS It only has parsing function , Can't guarantee the corresponding Internet ip The usability of , and nginx When acting as a reverse agent , And web-server There is a live detection mechanism between , When web-server Hang up , Ability to automatically migrate traffic ;
(2) When web-server When expansion is needed , adopt DNS The expansion takes effect for a long time , and nginx It's the part of the server that is completely under its own control ,web-server Expansion is more real-time and convenient ;
Because of the above two reasons , Generally, high availability reverse proxy is used in architecture .
summary
In architecture design , Besides domain name resolution ,DNS There are other uses :
(1) intelligence DNS, According to the user ip To access the server nearby ;
(2)DNS polling , Extend the reverse proxy layer horizontally ;
(3) utilize DNS Implement load balancing ;
I hope you all get something .
Sweep yards attention “ Architect's way ” Video Number
Video number needs to have 100 Attention , To open authentication , I hope you will be the first 100 A friend . thank , Gratitude .
版权声明
本文为[osc_fge5j3lp]所创,转载请带上原文链接,感谢
边栏推荐
- 03.优先链接模型
- An attempt to read or write to protected memory occurred using the CopyMemory API. This usually indicates that other memory is corrupted.
- 医疗项目管理的三种实用技巧
- 为wget命令设置代理
- What are the implementations of distributed locks?
- JVM学习(五) -执行子系统
- 苏宁基于知识图谱的大规模告警收敛和根因定位实践
- Flink 系例 之 Reduce
- Nine kinds of distributed primary key ID generation schemes of sub database and sub table are quite comprehensive
- Explain Python input() function: get user input string
猜你喜欢

彩虹排序 | 荷兰旗问题

Android Development - service application, timer implementation (thread + service)

Online course of tutorial system processing is in progress

Efficient Estimation of Word Representations in Vector Space 论文笔记

接口测试如何在post请求中传递文件

医疗项目管理的三种实用技巧

“开源软件供应链点亮计划 - 暑期 2020”公布结果 基于 ChubaoFS 开发的项目获得最佳质量奖

块级元素和行内元素

Configure switch trunk interface traffic local priority forwarding (cluster / stack)

An attempt to read or write to protected memory occurred using the CopyMemory API. This usually indicates that other memory is corrupted.
随机推荐
Technology and beauty are so expensive, it's better to find consultants | aalab enterprise consulting business
Aren't you curious about how the CPU performs tasks?
Stack & queue (go) of data structure and algorithm series
Go语言初始化单例变量的几种方法
EFF 认为 RIAA 正在“滥用 DMCA”来关闭 YouTube-DL
技美那么贵,不如找顾问 | AALab企业顾问业务
After SQL group query, get the first n records of each group
Complete set of linked list operations of data structure and algorithm series (3) (go)
Using rem, the font size changes when the screen zooms
Reading design patterns adapter patterns
iPhone“连到系统上的设备没有发挥作用”原因分析及解决方法 20200105
Viewing PDB files from the angle of assembly
In the future, China Telecom will make cloud computing service the main business of China Telecom
Python loading voice class custom dataset
10款必装软件,让Windows使用效率飞起!
Efficient Estimation of Word Representations in Vector Space 论文笔记
如何用函数框架快速开发大型 Web 应用 | 实战
20201107第16课,使用Apache服务部署静态网站;使用Vsftpd服务传输文件
线上服务的FGC问题排查,看这篇就够了!
【分布式】分布式锁都有哪些实现方案?