CRI Reti 04 Application Layer
CRI Reti 04 Application Layer
Contents:
We will follow more or less (we’ll cut quite a lot) the corresponding chapter of the textbook:
“Computer Networking: a Top-Down Approach” by Jim Kurose and Keith Ross, 8th Ed. (7th is fine as well)
Disclaimers:
▪ Original slides are courtesy of the textbook authors
▪ Main content selection made by dott. Luca Tagliapietra Application Layer: 1-1
▪ permanent IP address
▪ often in data centers, for scaling
clients: local or
communicate
▪ peers request service from other
peers, provide service in return to
other peers local or
regional ISP
• self scalability – new peers bring new
service capacity, as well as new service home network content
demands provider
network datacenter
▪ peers are intermittently connected network
Sockets
▪ process sends/receives messages to/from its socket
▪ socket analogous to door
• sending process launches message out door
• sending process relies on transport infrastructure on other side of
door to deliver message to socket at receiving process
• two sockets involved: one on each side
application application
socket controlled by
process process app developer
transport transport
network network controlled
link by OS
link Internet
physical physical
time time
Non-persistent HTTP response time = 2RTT+ file transmission time
Application Layer: 2-20
Persistent HTTP (HTTP 1.1)
Non-persistent HTTP issues: Persistent HTTP (HTTP1.1):
▪ requires 2 RTTs per object ▪ server leaves connection open after
▪ OS overhead for each TCP sending response
connection ▪ subsequent HTTP messages
▪ browsers often open multiple between same client/server sent
parallel TCP connections to over open connection
fetch referenced objects in ▪ client sends requests as soon as it
parallel encounters a referenced object
▪ as little as one RTT for all the
referenced objects (cutting
response time in half)
Application Layer: 2-21
HTTP request message
two types of HTTP messages: request, response
HTTP request message:
ASCII (human-readable format)
carriage return character
line-feed character
request line
(GET, POST, GET /index.html HTTP/1.1\r\n
HEAD commands) Host: www-net.cs.umass.edu\r\n
User-Agent: Firefox/3.6.10\r\n
Accept: text/html,application/xhtml+xml\r\n
header Accept-Language: en-us,en;q=0.5\r\n
lines Accept-Encoding: gzip,deflate\r\n
carriage return, Accept-Charset: ISO-8859-1,utf-8;q=0.7\r\n
line feed at start Keep-Alive: 115\r\n
Connection: keep-alive\r\n
of line indicates \r\n
end of header lines
Application Layer 2-22
status line
(protocol
status code HTTP/1.1 200 OK\r\n
status phrase) Date: Sun, 26 Sep 2010 20:09:20 GMT\r\n
Server: Apache/2.0.52 (CentOS)\r\n
Last-Modified: Tue, 30 Oct 2007 17:00:02
GMT\r\n
header ETag: "17dc6-a5c-bf716880"\r\n
Accept-Ranges: bytes\r\n
lines Content-Length: 2652\r\n
Keep-Alive: timeout=10, max=100\r\n
Connection: Keep-Alive\r\n
Content-Type: text/html; charset=ISO-8859-
1\r\n
data, e.g., \r\n
requested data data data data data ...
HTML file
Application Layer 2-24
server
▪ heavy load at upper authoritative DNS server
levels of hierarchy? dns.cs.umass.edu