Professional Documents
Culture Documents
Lec 4
Lec 4
Application Layer
ebay 8734
usual http request msg Amazon server
cookie file creates ID
usual http response
1678 for user create backend
ebay 8734
set-cookie: 1678 entry database
amazon 1678
usual http request msg
cookie: 1678 cookie- access
specific
usual http response msg action
client origin
server
Application Layer 2-5
More about Web caching
Mbps
RTT from institutional router
to any origin server: 2 sec 1.54 Mbps
access link rate: 1.54 Mbps access link
institutional
consequences: problem! network
LAN utilization: 15% 1 Gbps LAN
access link utilization = 99%
total delay = Internet delay +
access delay + LAN delay
= 2 sec + minutes + usecs 2-7
Caching example: fatter access link
assumptions:
avg object size: 100K bits
avg request rate from origin
browsers to origin servers
servers:15/sec public
avg data rate to browsers: 1.50 Internet
Mbps
RTT from institutional router
to any origin server: 2 sec 1.54 Mbps
154 Mbps
access link rate: 1.54 Mbps access link
154 Mbps institutional
consequences: network
LAN utilization: 15% 9.9% 1 Gbps LAN
access link utilization = 99%
total delay = Internet delay + access
delay + LAN delay
= 2 sec + minutes + usecs
msecs 2-8
user
mail access user
SMTP SMTP protocol
agent agent
(e.g., POP,
IMAP)
… …
server” cis.poly.edu
gaia.cs.umass.edu
Application Layer 2-30
DNS name root DNS server
resolution example
2 3
recursive query: 7
6
puts burden of name TLD DNS
resolution on server
contacted name local DNS server
server dns.poly.edu 5 4
heavy load at upper 1 8
levels of hierarchy?
authoritative DNS server
dns.cs.umass.edu
requesting host
cis.poly.edu
gaia.cs.umass.edu
Application Layer 2-31
DNS: caching, updating records
type=A type=CNAME
name is hostname name is alias name for some
value is IP address “canonical” (the real) name
type=NS
www.ibm.com is really
servereast.backup2.ibm.com
name is domain (e.g., value is canonical name
foo.com)
value is hostname of
authoritative name type=MX
server for this domain value is name of mailserver
associated with name
Application Layer 2-33
DNS protocol, messages
query and reply messages, both with same message format
2 bytes 2 bytes
query or reply
recursion desired answers (variable # of RRs)
recursion available
authority (variable # of RRs)
reply is authoritative
additional info (variable # of RRs)
Application Layer 2-34
DNS protocol, messages
2 bytes 2 bytes
identification flags
time to distribute F
to N clients using
client-server approach Dc-s > max{NF/us,,F/dmin}
increases linearly in N
Application Layer
2-40
File distribution time: P2P
time to distribute F
to N clients using
P2P approach
DP2P > max{F/us,,F/dmin,,NF/(us + Sui)}
increases linearly in N …
Application Layer … but so does this, as each peer brings service
2-41 capacity
Client-server vs. P2P: example
client upload rate = u, F/u = 1 hour, us = 10u, dmin ≥ us
3.5
P2P
Minimum Distribution Time
3
Client-Server
2.5
1.5
0.5
0
0 5 10 15 20 25 30 35
Alice arrives …
… obtains list
of peers from tracker
… and begins exchanging
file chunks with peers in torrent
Application Layer 2-43
P2P file distribution: BitTorrent