Application protocols
แนะนำใหม่
คำศัพท์
| English | ความหมาย |
|---|---|
| DNS/ˌdiː en ˈes/ | DNS |
| HTTP/ˌeɪtʃ tiː tiː ˈpiː/ | A request-response grammar: request line, headers, blank line, body — and the status codes class is the promise: 2xx success, 3xx redirect, 4xx client error, 5xx server error. |
English
Resolve the name
- DNS turns a name into an address by hierarchical delegation: the root knows the TLD servers,
.comknows the registrars, the authoritative server knows the host. Each answer is a referral downward, and caching skips the walk for the answer's TTL. - HTTP is a request-response grammar: request line, headers, blank line, body — and the status codes class is the promise: 2xx success, 3xx redirect, 4xx client error, 5xx server error.

{exercise:uni-cs0905-dns}
ฝึกฝน
DNS delegation means the root answers with —
ความยาก 1/5 · 100 เหรียญ + บอนัสน้อยๆ เมื่อทำสำเร็จครั้งแรกในวันนี้
Each level refers downward; the authoritative server holds the host record.
English
One page, by the bytes
GET /index.html HTTP/1.1with a Host header; the server answers200 OK, headers (Content-Type,Content-Length: 128), blank line, exactly 128 body bytes.- The blank line is load-bearing: the parser waits for exactly those two newlines. Content-Length counts body bytes only — headers are counted by the blank line's position.
{exercise:uni-cs0905-bytes}
ฝึกฝน
The header block ends at —
ความยาก 1/5 · 100 เหรียญ + บอนัสน้อยๆ เมื่อทำสำเร็จครั้งแรกในวันนี้
Two newlines end the headers - the parser waits for exactly those.
English
Codes as promises
- 200 (here is the body), 301 (it moved —
Locationsays where), 404 (you asked wrong), 500 (I broke). A crawler treats 301 as a pointer, 404 as a dead end, 500 as retry-later. - One global name table would be one global outage: delegation splits the failure domain as well as the data.
{exercise:uni-cs0905-codes}
ฝึกฝน
A 301 response tells the client —
ความยาก 1/5 · 100 เหรียญ + บอนัสน้อยๆ เมื่อทำสำเร็จครั้งแรกในวันนี้
Redirect: the resource lives elsewhere now.