Beruflich Dokumente
Kultur Dokumente
http://www.cs.cmu.edu/~dga/15-441/S08/
1 2
3 4
Survivability Fate Sharing
Connection
State No State State
! If network disrupted and reconfigured
» Communicating entities should not care! ! Lose state information for an entity if (and
» No higher-level state reconfiguration only if?) the entity itself is lost.
» Ergo, transport interface only knows “working” and “not
working.” Not working == complete partition. ! Examples:
» OK to lose TCP state if one endpoint crashes
! How to achieve such reliability?
– NOT okay to lose if an intermediate router reboots
» Where can communication state be stored?
» Is this still true in today’s network?
Network Host – NATs and firewalls
Failure handing Replication “Fate sharing” ! Survivability compromise: Heterogenous
Net Engineering Tough Simple network -> less information available to end
hosts and Internet level recovery mechanisms
Switches Maintain state Stateless
Host trust Less More 5 6
! Recall from last time TCP vs. UDP ! Discussed a lot of this last time -
» Elastic apps that need reliability: remote login or email » Interconnect the ARPANET, X.25 networks, LANs, satellite
» Inelastic, loss-tolerant apps: real-time voice or video networks, packet networks, serial links…
» Others in between, or with stronger requirements ! Mininum set of assumptions for underlying net
» Biggest cause of delay variation: reliable delivery » Minimum packet size
– Today’s net: ~100ms RTT » Reasonable delivery odds, but not 100%
– Reliable delivery can add seconds. » Some form of addressing unless point to point
! Original Internet model: “TCP/IP” one layer ! Important non-assumptions:
» First app was remote login… » Perfect reliability
» But then came debugging, voice, etc. » Broadcast, multicast
» These differences caused the layer split, added UDP » Priority handling of traffic
! No QoS support assumed from below » Internal knowledge of delays, speeds, failures, etc.
» In fact, some underlying nets only supported reliable delivery ! Much engineering then only has to be done once
– Made Internet datagram service less useful!
» Hard to implement without network support
» QoS is an ongoing debate…
7 8
The “Other” goals Accountability
9 10
11 12
Ftp Commands, Responses HTTP Basics
Sample Commands: Sample Return Codes
! sent as ASCII text over ! status code and phrase ! HTTP layered over bidirectional byte
control channel ! 331 Username OK, stream
! USER username password required
» Almost always TCP
! PASS password ! 125 data connection
! LIST return list of files in
already open; transfer ! Interaction
starting
current directory » Client sends request to server, followed by
! 425 Can’t open data response from server to client
! RETR filename retrieves connection
(gets) file » Requests/responses are encoded in text
! 452 Error writing file
! STOR filename stores (puts) ! Stateless
file onto remote host » Server maintains no information about past client
requests
13 14
15 16
HTTP Request HTTP Request
17 18
19 20
HTTP Response HTTP Response Example
21 22
ss
user’s browser requests arrives at site, one week later:
ce
ac
4) Back-end database at Web site creates a unique ID
site and creates an entry in Cookie file usual http request msg
backend database for ID cookie-
cookie: 1678
amazon: 1678 specific
ebay: 8734 usual http response msg action
23 24
Typical Workload (Web Pages) HTTP 1.1 - new features
! Multiple (typically small) objects per page ! Newer versions of HTTP add several new
! File sizes features (persistent connections, pipelined
» Why different than request sizes?
transfers) to speed things up.
» Also heavy-tailed ! Let’s detour into some performance
– Pareto distribution for tail evaluation and then look at those features
– Lognormal for body of distribution
! Embedded references
» Number of embedded objects = pareto – p(x) = akax-(a+1)
25 26
31 32
One more detail: TCP HTTP 0.9/1.0
…Data…
35 36
Netscape Solution Persistent Connection Solution
! Mosaic (original popular Web browser) ! Multiplex multiple transfers onto one TCP connection
fetched one object at a time!
! How to identify requests/responses
! Netscape uses multiple concurrent
» Delimiter ! Server must examine response for delimiter string
connections to improve response time » Content-length and delimiter ! Must know size of transfer in
» Different parts of Web page arrive independently advance
» Can grab more of the network bandwidth than other » Block-based transmission ! send in multiple length delimited
users blocks
» Store-and-forward ! wait for entire response and then use
! Doesn’t necessarily improve response time content-length
» TCP loss recovery ends up being timeout dominated » Solution ! use existing methods and close connection
because windows are small otherwise
37 38
39 40
Persistent Connection
Performance Remaining Problems
41 42
43 44
Fair Sharing of Bandwidth But It is Not that Simple
45 46
49