Comprehensive Overview of the Web Access Process: From DNS Resolution to Kubernetes Deployment
This article explains the complete web request lifecycle—including DNS lookup, caching mechanisms, HTTP/HTTPS communication, TCP/UDP transport, gateway routing, backend service models, virtualization, Docker containerization, and Kubernetes orchestration—providing engineers with a solid foundation for diagnosing and optimizing modern web applications.
The article begins with an introduction that highlights the rapid evolution of internet technologies and stresses the importance for front‑end engineers to understand underlying infrastructure such as operating systems, containers, cloud computing, and serverless.
It then details the DNS lookup process, explaining how domain names are translated to IP addresses via browser cache, OS cache, and DNS servers, and shows how the hosts file can be edited to override mappings.
#可以修改域名映射到本机IP
127.0.1.1 m.baidu.comNext, the article describes caching strategies, covering browser cache (cookies, local storage, service workers), strong caching (Expires, Cache‑Control) and conditional caching (ETag, Last‑Modified).
The network access section explains how HTTP/HTTPS requests travel from the client to the target server, including the role of CDNs and proxy caches.
In the HTTP process subsection, the structure of an HTTP request (request line, headers, body) and response (status line, headers, body) are illustrated with concrete examples.
# http 请求
GET /hello.txt HTTP/1.1
User-Agent: curl/7.16.3 libcurl/7.16.3 OpenSSL/0.9.7l zlib/1.2.3
Host: m.baidu.com
Accept-Language: en, mi # http 响应
HTTP/1.1 200 OK
Date: Mon, 27 Jul 2009 12:28:53 GMT
Server: Apache
Last-Modified: Wed, 22 Jul 2009 19:15:56 GMT
ETag: "34aa387-d-1568eb00"
Accept-Ranges: bytes
Content-Length: 51
Vary: Accept-Encoding
Content-Type: text/plainThe TCP and UDP sections outline the reliability guarantees of TCP (three‑way handshake, flow control, congestion control) versus the lightweight, connectionless nature of UDP, and list typical application protocols that run on each.
The HTTPS subsection explains the need for a CA‑issued certificate, the handshake steps (certificate exchange, random value generation, symmetric encryption), and provides a Node.js example for creating an HTTPS server.
/**
* 在node.js server 配置私钥和公钥
*/
const https = require('https');
const fs = require('fs');
const options = {
key: fs.readFileSync('test/fixtures/keys/agent2-key.pem'),
cert: fs.readFileSync('test/fixtures/keys/agent2-cert.pem')
};
https.createServer(options, (req, res) => {
res.writeHead(200);
res.end('hello world\n');
}).listen(8000);The gateway process describes the role of an API gateway as the single entry point, handling authentication, monitoring, load balancing, caching, and request routing, with an Nginx configuration example.
# nginx在根据域名进行网关配置
server {
listen 外网IP:443 default_server;
server_name *.xxx.com;
location / {
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_pass https://abcdef;
}
ssl on;
ssl_certificate /etc/apache2/ssl/nginx-cert.crt;
ssl_certificate_key /etc/apache2/ssl/private.key;
ssl_prefer_server_ciphers on;
}The application service section compares three deployment models: traditional multi‑process, multi‑thread, and asynchronous event‑driven servers, explaining their trade‑offs in resource consumption and performance.
It then contrasts traditional virtualization (multiple VMs on a single physical host) with containerization, describing Docker’s lightweight isolation, image‑container‑repository model, and the benefits of using images as reusable, portable artifacts.
Finally, the article introduces Kubernetes as a cloud‑native orchestration platform, detailing its master‑node architecture, pod concept, kubelet component, and how it automates deployment, scaling, and monitoring of containerized workloads.
The conclusion emphasizes that understanding each layer—from DNS to Kubernetes—helps engineers diagnose issues, optimize caching, and choose appropriate infrastructure for different scales of web applications.
TAL Education Technology
TAL Education is a technology-driven education company committed to the mission of 'making education better through love and technology'. The TAL technology team has always been dedicated to educational technology research and innovation. This is the external platform of the TAL technology team, sharing weekly curated technical articles and recruitment information.
How this landed with the community
Was this worth your time?
0 Comments
Thoughtful readers leave field notes, pushback, and hard-won operational detail here.