Files
wonder df63692a18
Deploy Examination / deploy (push) Successful in 31s
feat: add 180 questions (90 sc + 90 fb) for networking subtopics
Cover 9 subtopics from the computer networking documentation:
- http-handshake: TCP/TLS/HTTP2/HTTP3 handshakes
- http-connection-cost: connection resource overhead & million concurrency
- connection-pooling: pool reuse, HTTP/1.1 vs HTTP/2
- http-keepalive: Keep-Alive principle, head-of-line blocking
- keepalive-scenarios: when to enable/disable Keep-Alive
- domain-sharding: HTTP/1.1 hack, HTTP/2 obsolescence
- cdn: edge nodes, caching, DDoS protection
- cors: same-origin policy, preflight requests
- go-build-strip: -s -w flags, binary size optimization
2026-09-02 21:33:09 +08:00

208 lines
6.7 KiB
JSON
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
{
"topic": "cdn",
"type": "single_choice",
"schema_version": "1.0.0",
"generated": "2026-09-02T21:20:00+08:00",
"questions": [
{
"id": "sc-001",
"type": "single_choice",
"difficulty": 2,
"tags": [
"CDN",
"边缘节点"
],
"question": "CDN 的核心思想是什么?",
"options": {
"A": "所有用户直接访问源站",
"B": "把资源复制到全球一堆服务器上,用户就近获取",
"C": "使用加密传输",
"D": "增加源站带宽"
},
"answer": "B",
"explanation": "CDN 的核心思想是把资源复制到全世界的边缘节点上,用户就近访问最近的边缘节点,减少延迟和源站压力。",
"source": null,
"related": []
},
{
"id": "sc-002",
"type": "single_choice",
"difficulty": 3,
"tags": [
"CDN",
"智能DNS"
],
"question": "CDN 的智能 DNS 根据什么决定返回哪个边缘节点的 IP?",
"options": {
"A": "用户浏览器版本",
"B": "请求来源 IP 的地理位置",
"C": "服务器负载",
"D": "随机选择"
},
"answer": "B",
"explanation": "CDN 的 DNS 服务器根据请求来源 IP 的地理位置(通过 IP 地理位置数据库)来决定返回哪个边缘节点的 IP,这个过程对用户完全透明。",
"source": null,
"related": []
},
{
"id": "sc-003",
"type": "single_choice",
"difficulty": 3,
"tags": [
"CDN",
"回源"
],
"question": "CDN 的回源是什么意思?",
"options": {
"A": "用户直接访问源站",
"B": "边缘节点缓存未命中时,去源站拉取文件",
"C": "源站主动推送文件",
"D": "DNS 解析失败"
},
"answer": "B",
"explanation": "回源是指边缘节点缓存未命中时,去源站拉取文件。第一次请求会慢一点(回源),之后就快了(缓存命中)。",
"source": null,
"related": []
},
{
"id": "sc-004",
"type": "single_choice",
"difficulty": 2,
"tags": [
"CDN",
"适合内容"
],
"question": "以下哪种内容最适合上 CDN?",
"options": {
"A": "用户个人数据",
"B": "实时交易数据",
"C": "图片、JS、CSS 等静态资源",
"D": "登录接口"
},
"answer": "C",
"explanation": "CDN 适合缓存内容不怎么变、所有人看到的一样、可以缓存的静态资源。用户个人数据、实时交易数据、登录接口等需要实时性的内容不适合。",
"source": null,
"related": []
},
{
"id": "sc-005",
"type": "single_choice",
"difficulty": 4,
"tags": [
"CDN",
"HTTPS终止"
],
"question": "CDN 的 HTTPS 终止是什么意思?",
"options": {
"A": "禁止 HTTPS 访问",
"B": "边缘节点处理 TLS 握手,到源站可以用 HTTP",
"C": "源站不支持 HTTPS",
"D": "CDN 自动升级到 HTTP/3"
},
"answer": "B",
"explanation": "HTTPS 终止是指边缘节点处理 TLS 握手,到源站可以用 HTTP(内网更快)。用户←HTTPS→CDN 边缘节点←HTTP→源站。",
"source": null,
"related": []
},
{
"id": "sc-006",
"type": "single_choice",
"difficulty": 3,
"tags": [
"CDN",
"DDoS"
],
"question": "CDN 如何防 DDoS?",
"options": {
"A": "直接丢弃流量",
"B": "攻击流量被分散到全球几百个边缘节点吸收",
"C": "使用防火墙",
"D": "关闭源站"
},
"answer": "B",
"explanation": "CDN 防 DDoS 的原理是攻击流量被分散到全球几百个边缘节点吸收,源站几乎无感。这是 CDN 的核心能力之一。",
"source": null,
"related": []
},
{
"id": "sc-007",
"type": "single_choice",
"difficulty": 3,
"tags": [
"CDN",
"缓存策略"
],
"question": "Cache-Control: max-age=31536000, immutable 表示什么?",
"options": {
"A": "缓存 1 天",
"B": "缓存 1 年,且不需要向源站发起条件请求",
"C": "不缓存",
"D": "缓存 5 分钟"
},
"answer": "B",
"explanation": "max-age=31536000 表示缓存 1 年,immutable 告诉浏览器这个资源永远不会改变,不需要向源站发起条件请求(If-Modified-Since/ETag 验证)。适用于文件名带版本号的静态资源。",
"source": null,
"related": []
},
{
"id": "sc-008",
"type": "single_choice",
"difficulty": 2,
"tags": [
"CDN",
"缓存分层"
],
"question": "CDN 的缓存分层顺序正确的是?",
"options": {
"A": "源站 → 区域节点 → 边缘节点 → 用户",
"B": "用户 → 边缘节点 → 区域节点 → 源站",
"C": "用户 → 源站 → 边缘节点",
"D": "边缘节点 → 用户 → 源站"
},
"answer": "B",
"explanation": "CDN 缓存分层:用户 → 边缘节点(缓存1)→ 区域节点(缓存2)→ 源站(原始文件)。请求从用户开始,逐层向上查找缓存。",
"source": null,
"related": []
},
{
"id": "sc-009",
"type": "single_choice",
"difficulty": 4,
"tags": [
"CDN",
"缓存一致性"
],
"question": "更新了 logo.png 但 CDN 还缓存旧的,应该怎么解决?",
"options": {
"A": "等自然过期",
"B": "文件名带版本号、调用 CDN API 强制清除缓存、或设置较短的 max-age",
"C": "重启 CDN 服务器",
"D": "删除源站文件"
},
"answer": "B",
"explanation": "缓存一致性问题的解决方案:(1)文件名带版本号 /logo.v2.png;(2)调用 CDN API 强制清除缓存;(3)设置较短的 max-age 等自然过期。",
"source": null,
"related": []
},
{
"id": "sc-010",
"type": "single_choice",
"difficulty": 3,
"tags": [
"CDN",
"源站压力"
],
"question": "100 万用户访问 CDN,源站大约处理多少次请求?",
"options": {
"A": "100 万次",
"B": "50 万次",
"C": "1 万次",
"D": "0 次"
},
"answer": "C",
"explanation": "CDN 可以消化 99% 的流量,100 万用户 → 99 万次命中边缘节点 → 源站只处理约 1 万次回源。这是 CDN 减轻源站压力的核心能力。",
"source": null,
"related": []
}
]
}