Вы находитесь на странице: 1из 8

HTTP and TCP: A Review

Carey Williamson Department of Computer Science University of Calgary

Network View: HTTP and TCP


TCP is a connection-oriented protocol
SYN SYN/ACK GET URL ACK Web Server Web Client YOUR DATA HERE FIN

FIN/ACK
2

ACK
Copyright 2005 Department of Computer Science

Example Web Page


Harry Potter Movies
page.html

As you all know, the new HP book will be out in June and then there will be a new movie shortly after that Harry Potter and the Bathtub Ring

hpface.jpg

castle.gif

3
Copyright 2005 Department of Computer Science

Client TCP SYN

Server

G
page.html TCP FIN TCP SYN G The classic approach in HTTP/1.0 is to use one HTTP request per TCP connection, serially.

hpface.jpg TCP FIN


TCP SYN G castle.gif TCP FIN
Copyright 2005 Department of Computer Science

Client TCP SYN

Server

G
page.html TCP FIN

C S
G

Concurrent (parallel) TCP connections can be used to make things faster. C S S

S G hpface.jpg castle.gif
F

5
Copyright 2005 Department of Computer Science

Client TCP SYN

Server

G
page.html G hpface.jpg G The persistent HTTP approach can re-use the same TCP connection for Multiple HTTP transfers, one after another, serially. Amortizes TCP overhead, but maintains TCP state longer at server. Timeout TCP FIN
Copyright 2005 Department of Computer Science

castle.gif

Client TCP SYN

Server

G
page.html

GG
hpface.jpg castle.gif

The pipelining feature in HTTP/1.1 allows requests to be issued asynchronously on a persistent connection. Requests must be processed in proper order. Can do clever packaging. Timeout

TCP FIN
Copyright 2005 Department of Computer Science

Summary of Web and HTTP


The major application on the Internet
Majority of traffic is HTTP (or HTTP-related)

Client/server model:
Clients make requests, servers respond to them Done mostly in ASCII text (helps debugging!)

Various headers and commands


Too many to go into detail here Many web books/tutorials exist (e.g., Krishnamurthy & Rexford 2001)
8
Copyright 2005 Department of Computer Science

Вам также может понравиться