3 Application Layer (HTTP, Web Proxy)
3 Application Layer (HTTP, Web Proxy)
Application Layer
• Application layer protocols define
– what messages are exchanged
Reading:
– the syntax of the messages Kurose & Ross: Ch 2
– the semantics of the messages
– how/when to exchange messages
– note the interaction is defined, not the application itself!
• We will examine three network applications and their protocols
– E-mail (SMTP – simple transport protocol) (Read up in the text
book)
– the Web (HTTP - HyperText Transfer Protocol)
– Domain Name Service (DNS)
– P2P file sharing
• But first we’ll look at current application architectures...
Computer Networking and Applications
PC running
Firefox browser
Appache
Web Server
iphone running
Safari browser
[email protected]
stored on server
Computer Networking and Applications
Electronic mail: mail servers
mail servers:
user
• mailbox contains incoming agent
messages for user mail user
• message queue of outgoing (to server agent
be sent) mail messages SMTP mail user
• SMTP protocol between mail server agent
• requests
– GET (get a URL)
– HEAD (meta data) PC running
– POST (send data to server) Firefox browser
– PUT, OPTIONS,DELETE,TRACE,CONNECT
• responses
– "nnn message <data>"
– 1xx Informational
– 2xx Success
– 3xx Redirection iphone running
Safari browser
– 4xx Client Error
– 5xx Server Error
Computer Networking and Applications
HTTP request format
GET /somedir/page.html HTTP/1.0 request line (GET, etc commands)
User-agent: Mozilla/4.0
header
Accept: text/html, image/gif,image/jpeg
lines
Accept-language:fr
Carriage return, line feed
(extra carriage return, line feed) indicates end of message
status line
HTTP response format
HTTP/1.0 200 OK
(protocol Date: Thu, 06 Aug 1998 12:00:15 GMT
status code Server: Apache/1.3.0 (Unix)
status phrase) header Last-Modified: Mon, 22 Jun 1998 …...
lines Content-Length: 6821
data, e.g., Content-Type: text/html
requested
html file data data data data data ...
Caching example:
assumptions:
avg object size: 1Mbit
avg request rate from browsers to origin origin
servers:15/sec servers
public
avg data rate to browsers: 15 Internet
Mbps
RTT from the Internet side of the access link
to an origin server: 2 seconds
access link rate: 15 Mbps 15 Mbps
access link
consequences:
LAN utilization: 15% problem! institutional
network
access link utilization = 100% 100 Mbps LAN
total delay = Internet delay + access
delay + LAN delay
= 2 sec + minutes + usecs
Computer Networking and Applications