Sunday, May 25, 2014

Cookies: Keeping “State”

Many major Web sites use cookies                                  
Four components:
1) Cookie header line in the
HTTP response message
2) Cookie header line in HTTP
request message
3) Cookie file kept on user’s host
and managed by user’s
browser
4) Back-end database at Web
site

Example:
- Susan accesses Internet always
from same PC
- She visits a specific e-commerce
site for the first time
- When initial HTTP requests arrives
at site, site creates a unique ID
and creates an entry in backend
database for ID


HTTP 0.9/1.0

● One request/response per TCP connection
– Simple to implement
● Disadvantages
– Multiple connection setups → three-way
handshake each time
● Several extra round trips added to transfer

– Multiple slow starts

Single Transfer Example


Performance Issues

● Short transfers are hard on TCP
– Stuck in slow start
● Lots of extra connections
– Increases server state/processing
● Servers also hang on to connection state after
the connection is closed
– Why must server keep these?
– Tends to be an order of magnitude greater than #

of active connections, why?

Netscape Solution
● Mosaic (original popular Web browser) fetched
one object at a time!
● Netscape uses multiple concurrent
connections to improve response time
– Different parts of Web page arrive independently
– Can grab more of the network bandwidth than
other users
● Doesn’t necessarily improve response time
– TCP loss recovery ends up being timeout

dominated because windows are small

Persistent Connection Solution
● Multiplex multiple transfers onto one TCP connection  (Fewer RTTs and less slow start)

HTTP 1.1 New Features

Newer versions of HTTP (1.1) add several  new features (persistent connections, pipelined transfers) to speed things up.

0 comments:

Post a Comment