sequenceDiagram Client ->> DNSResolver: Request to resolve domain name activate DNSResolver DNSResolver ->> RootDNS: Request root DNS server activate RootDNS RootDNS -->> DNSResolver: Respond with TLD DNS address deactivate RootDNS DNSResolver ->> TLDNS: Request TLD DNS server activate TLDNS TLDNS -->> DNSResolver: Respond with Authoritative DNS address deactivate TLDNS DNSResolver ->> AuthoritativeDNS: Request Authoritative DNS activate AuthoritativeDNS AuthoritativeDNS -->> DNSResolver: Respond with IP address deactivate AuthoritativeDNS DNSResolver -->> Client: Return IP address deactivate DNSResolver
浏览器解析完键入的 URL 并生成 HTTP 报文之后,需要委托给 OS 将报文发送给 Web 服务器。
我们知道,键入的域名其实是无法找到目标服务器的,需要使用 DNS 技术,查询服务器域名对应的 IP 地址,OS 才能够发送消息给正确的 Web 服务器。