CCN Lecture 5
CCN Lecture 5
Networks
Lecture 5
Power point slides made with the help from the slides
came with the computer networking book written by Kurose
Web page
• Web page consists of objects, each of which can be stored
on different Web servers
• Object can be HTML file, JPEG image, video clip
• Web page consists of base HTML file which includes several
referenced objects, each addressable by a URL
• Each URL has two components
a) The hostname of the server that houses the object
b) The object’s path name
HTTP Overview
• HTTP: HyperText Transfer Protocol
(RFC 1945 (old version), RFC 7230, RFC 7540)
• Web’s application layer protocol
• Client/Server model:
a) Client: browser that requests, receives,
(using HTTP protocol) and displays Web
objects
b) Server: Web server sends (using HTTP
protocol) objects in response to
requests. Ex: Apache,
Microsoft’s web server
HTTP Overview
PC running
Firefox browser
server running
Apache Web
server
iPhone running
Safari browser
HTTP uses TCP
• Client initiates TCP connection (creates socket) to
server, port 80
• Server accepts TCP connection from client
• HTTP messages exchanged between browser and
web server
• TCP connection closed
HTTP Overview
• HTTP is “stateless”
- Server maintains no information about past client
requests
- It simplifies the server design
HTTP Connections: 2 types
1) Non-persistent HTTP
a) TCP connection opened
b) at most one object sent over TCP connection
c) TCP connection closed
* downloading multiple objects requires
multiple connections
2) Persistent HTTP
a)TCP connection opened to a server
b) multiple objects can be sent over single TCP
connection between client and server
c) TCP connection closed
Non-persistent HTTP: example
Non-persistent HTTP: example
Non-persistent HTTP: response time
• RTT – Round-trip time: Time for a small packet to travel from client to
server and back
• HTTP response time (per object):
a) One RTT to initiate TCP connection
b) One RTT for HTTP request and first
few bytes of HTTP response to return
c) object/ file transmission time
* sp: space, cr: carriage return character, lf: line feed character
HTTP Response Message
• Typical HTTP response message: status line + header lines + entity body
HTTP/1.1 200 OK (Status line: server HTTP version Status code)
Connection: close (telling the client it is closing the TCP connection)
Date: Tue, 18 Aug 2015 15:44:04 GMT (time and date when the HTTP
response was created)
Header lines
institutional
network
1 Gbps LAN