Computer Networking: Application Layer
计算机网络:应用层
Last updated on
Principles of network applications
An application-layer protocol defines:
- types of messages exchanged
- message syntax
- message semantics
- rules for when and how to send & response to messages
Internet transport protocols services
TCP:
- reliable transport
- flow control
- congestion control
- connection-oriented
UDP:
- unreliable data transfer
- state-less
Web and HTTP
HTTP: two types
Non-persistent HTTP:
- TCP connection opened
- at most one object sent over TCP connection
- TCP connection closed
Persistent HTTP:
- TCP connection opened to a server
- multiple objects can be sent over single TCP
- TCP connection closed
Maintaining user-server state: cookies
Web cache aka proxy server
performance:
- much lower access link utilization
- much shorter end-end delay
HTTP generation
HTTP/1
HTTP/2
decreased delay in multi-object HTTP requests
Reduce HOL blocking by dividing objects into smaller chunks.
HTTP/3
Adds security, and per object error/congestion control over UDP.
DNS
- distributed database implemented in hierarchy of many name servers
- application-layer protocol: hosts, DNS servers communicate to resolve names (address/name translation)
Services:
- hostname to IP address translation
- host/mail-server aliasing
- load distribution
Architecture: distributed, hierarchical database
DNS name resolution
Iterated query
“I don’t know this name, but ask this server.”
Recursive query
“I don’t know this name, but I will ask it for you.”
DNS records
resource records (RR)
(name, value, type, ttl)
type = A
name
is hostnamevalue
is IP address
type = NS
name
is domainvalue
is hostname of authoritative name server for this domain
type = CNAME
name
is alias name for some “canonical”(the real) namewww.ibm.com
is reallyservereast.backup2.ibm.com
value
is canonical name
type = MX
value
is name of SMTP mail server associated withname
P2P applications
File distribution
client-server vs P2P
client-server
- server side
- time to send 1 copy:
- time to send N copy:
- client side
- : min client download rate
- min client download time:
- time to distribute F to N clients: increases linearly in N
P2P
- server side
- time to send 1 copy:
- client
- min client download time:
- clients: aggregate must download NF bits
- max upload rate:
- time to distribute F to N clients: which does not increases linearly in N
Real-world example of P2P file distribution: BitTorrent
- requesting chunks
- sending chunks
Video streaming and CDN
Streaming stored video
challenges:
- bandwidth vary over time
- packet loss and delay
CDN
- stores copies of content at CDN nodes
- user request content, service provider returns manifest
- client then retrieves content at highest supportable rate
- may choose different rate or copy if network environment changed