| English | 释义 | 拼音 |
|---|---|---|
| Domain Name System/dəˈmeɪn neɪm ˈsɪstəm/ | 域名系统 | yù míng xì tǒng |
| Uniform Resource Locator/ˈjuːnɪfɔːm rɪˈzɔːs ləʊˈkeɪtə/ | 统一资源定位符 | tǒng yī zī yuán dìng wèi fú |
| protocol/ˈprəʊtəkɒl/ | 协议 | xié yì |
| domain name/dəˈmeɪn neɪm/ | 域名 | yù míng |
| resolver/rɪˈzɒlvə/ | 解析器 | jiě xī qì |
| bit streaming/bɪt ˈstriːmɪŋ/ | 流式传输 | liú shì chuán shū |
| real-time/rɪəl taɪm/ | 实时 | shí shí |
| on-demand/ɒn dɪˈmænd/ | 点播 | diǎn bō |
| buffer/ˈbʌfə/ | 缓冲 | huǎn chōng |
| bit rate/bɪt reɪt/ | 比特率 | bǐ tè lǜ |
| lossy/ˈlɒsi/ | 有损 | yǒu sǔn |
| compression/kəmˈpreʃn/ | 压缩 | yā suō |
曾经运行整个互联网的电话簿
- 直到 1983 年,互联网上的每台计算机都靠从斯坦福的一台机器下载同一个文本文件 HOSTS.TXT 来找到其他计算机。每加入一台新计算机,文件就变长,所有人都要再取一次。
- Paul Mockapetris 用一个分布式的服务器系统取代了这个文件,每台服务器负责名字空间中自己的那一部分。他把它叫做域名系统。
- 这就是你输入名字而不是十二位数字的原因,也是网站可以搬家而不用通知你的原因。
- 这一课讲你输入的地址、查找它的系统,以及一段视频怎样在还没传完之前就到达你面前。
URL
- 统一资源定位符(Uniform Resource Locator,URL)定位万维网上的一个资源:
https://www.example.com/about/contact.html。 - 协议(protocol),
https,说明怎样获取它。域名(domain name),www.example.com,用人能读的形式给服务器命名。路径,/about/contact.html,给那台服务器上的文件命名。 - URL 还可能带端口号和
?后面的查询字符串,但协议、域名和路径是考试要问的三个部分。
In https://www.example.com/about/contact.html, what is https?
难度 1/5 · 今日首次完成可获 100 金币及少量额外奖励
https is the protocol; www.example.com is the domain name; /about/contact.html is the path.
Match each part of https://www.example.com/about/contact.html to its name.
难度 2/5 · 今日首次完成可获 140 金币及少量额外奖励
A URL is protocol + domain name + path — the protocol says how, the domain says which server, the path says which resource.
域名系统
- 计算机把数据投递到 IP 地址,而不是名字。域名系统(Domain Name System,DNS)是一组分布式服务器,把域名翻译成 IP 地址。
- 浏览器向一个解析器(resolver)提问。如果解析器没有缓存答案,它问一台根服务器,根服务器指向
.com的顶级域服务器,后者指向example.com的权威服务器,权威服务器返回 IP 地址。 - 然后浏览器连接到那个 IP 地址并请求路径。整个查找只需几毫秒,而且会被缓存,所以很少重复。

解析器、根、顶级域、权威:然后浏览器连接
How DNS finds a website
Step through a DNS lookup. The network routes by IP, not by name — so before anything loads, DNS must turn the domain name into an IP address.
The Domain Name System (DNS) mainly:
难度 1/5 · 今日首次完成可获 100 金币及少量额外奖励
DNS resolves human-readable domain names to the numeric IP addresses the network actually uses.
例题:从输入地址到加载页面
- 用户输入 URL。浏览器把协议、域名和路径分开。
- 浏览器把域名发给 DNS 解析器,解析器沿 DNS 层级查询,直到权威服务器返回服务器的 IP 地址。
- 浏览器打开到该 IP 地址的连接,并为该路径发送 HTTP 请求。
- 服务器返回页面,浏览器渲染它。四步,而 DNS 这一步最常被漏掉。
Put a DNS lookup in order, from typing the address to loading the page.
难度 3/5 · 今日首次完成可获 200 金币及少量额外奖励
The resolver walks the hierarchy (root → TLD → authoritative) until it gets the IP, then the browser connects.
DNS 为什么存在
- 人记名字;路由器按数字投递。DNS 让两件事同时成立。
- 网站可以通过修改 DNS 记录搬到新服务器,或分布到许多台上。用户输入的名字不变。
- 这个系统是分布式的,没有一台服务器保存所有名字;每一级都有缓存,所以负载被分散。
Why does the web use DNS rather than having users type IP addresses? Select 所有 that apply.
难度 2/5 · 今日首次完成可获 140 金币及少量额外奖励
DNS is about names, flexibility and distribution. The lookup adds a few milliseconds; it does not speed up the page itself.
比特流
- 比特流(bit streaming)把多媒体作为连续的流发送,接收方边到边播,而不是先下载整个文件。
- 实时(real-time)流在事件发生时捕获并发送——现场体育赛事或视频通话。你不能回放,低延迟至关重要。
- 点播(on-demand)流播放已经存在服务器上的文件。你可以暂停和回放,服务器可以提前发送。

缓冲位于网络和播放器之间
Streaming media plays as it arrives, without first downloading the whole file.
难度 1/5 · 今日首次完成可获 100 金币及少量额外奖励
That is the defining feature of streaming — the receiver plays the stream as it comes in (with a small buffer), rather than waiting for a full download.
Compared with real-time (live) streaming, on-demand streaming:
难度 1/5 · 今日首次完成可获 100 金币及少量额外奖励
On-demand content is pre-recorded, so you can pause/rewind and the server can buffer well ahead. Live streaming can't be rewound and needs low latency.
缓冲和比特率
- 缓冲(buffer)在播放开始前存储几秒的数据,这样网络的短暂下降不会让画面停下。点播流可以提前缓冲很多;直播流只能缓冲一点,否则就不再是"直播"。
- 比特率(bit rate)是流每秒需要的比特数。它必须保持低于宽带速度,否则数据到达比播放慢,播放就会卡住。
- 有损(lossy)压缩(compression)把比特率压下来:动态画面掩盖了小的损失,而流必须适合带宽。
Why does a streaming player use a buffer?
难度 1/5 · 今日首次完成可获 100 金币及少量额外奖励
The buffer holds a few seconds ahead of what is playing, so short slow-downs in the network don't cause the playback to stall.
For a stream to play without stalling, its bit rate must stay ____ the broadband speed of the connection.
难度 1/5 · 今日首次完成可获 100 金币及少量额外奖励
If more bits per second are needed than the connection delivers, data arrives more slowly than it is played and the buffer empties.
例题:为什么直播前要压缩?
- 解释为什么视频在实时流传输前要被压缩。
- 未压缩的流需要的带宽会超过连接所有的,所以帧会迟到,播放会卡住。
- 压缩减少比特数,所以比特率保持在宽带速度以下,延迟保持很小。
- 两端需要的存储和成本更少。直播流里迟到的数据包会被直接丢弃,因为直播不能等它。
例题:实时流水线
- 描述一场现场活动怎样流传输给观众。
- 摄像机和麦克风捕获并采样活动。数据被编码,用压缩缩小它。
- 流作为数据包发送过网络。观众的设备缓冲一点,然后播放,丢弃任何到得太晚的数据包。
- 对比点播:文件已经存在,所以服务器可以提前发送,缓冲可以很大,观众可以暂停和回放。
Put the stages of real-time streaming in order.
难度 3/5 · 今日首次完成可获 200 金币及少量额外奖励
Capture, encode, send, play. The compression happens before sending, which is what keeps the bit rate inside the bandwidth.
容易丢掉的分
- DNS 把名字变成 IP 地址,考试答案里绝不能反过来,而且它不是传送页面的东西。
- 实时流仍然可以用缓冲;只是很小。它做不到的是回放。
- 比特率要与连接速度比较。比特率更高时流会卡住;要说清哪个是哪个。
- URL 的协议部分是
https,不是www。www是域名的一部分。
In a real-time stream, a packet that arrives too late is held until it can be played in its proper place.
难度 1/5 · 今日首次完成可获 100 金币及少量额外奖励
A live stream cannot wait: a late packet is dropped and playback continues. Only on-demand streaming can afford to wait, because it buffers far ahead.
你掌握了
- URL = 协议 + 域名 + 路径;DNS 通过解析器 → 根 → 顶级域 → 权威服务器把域名变成 IP 地址
- DNS 的存在让人用名字、路由器用数字,网站可以搬家而名字不变
- 比特流边到边播:实时是直播且不能回放,点播是已存储的且可以回放
- 缓冲抵消网络的波动;比特率必须低于宽带速度,这就是流使用有损压缩的原因