ACN Week 6
ACN Week 6
P2P applications
Principles of network video streaming and content
applications distribution networks
Web and HTTP socket programming with
E-mail, SMTP, IMAP UDP and TCP
The Domain Name System
DNS
1. Assuming zero transmission time for the HTML object, how much time (in msec) elapses from when
the client clicks on the link until the client receives the object?
The time from when the Web request is made in the browser until the page is displayed in the browser is:
RTT0 + RTT1 + RTT2 + 2*RTTHTTP = 3 + 45 + 22 + 2*26 = 122 msecs. Note that 2 RTT HTTP are needed to
fetch the HTML object - one RTTHTTP to establish the TCP connection, and then one RTTHTTP to perform
the HTTP GET/response over that TCP connection.
Application Layer: 2-2
Now suppose the HTML object references 4 very small objects on the same server. Neglecting
transmission times, how much time (in msec) elapses from when the client clicks on the link
until the base object and all 4 additional objects are received from web server at the client,
assuming non-persistent HTTP and no parallel TCP connections?
The time from when the Web request is made in the browser until the page is
displayed in the browser is: RTT0 + RTT1 + RTT2 + 2*RTTHTTP + 2*4*RTTHTTP = 3 + 45 + 22 +
2*26 + 2*4*26 = 330 msecs. Note that two RTTHTTP delays are needed to fetch the base
HTML object - one RTTHTTP to establish the TCP connection, and one RTTHTTP to send the
HTTP request, and receive the HTTP reply. Then, serially, for each of the 4 embedded
objects, a delay of 2*RTTHTTP is needed - one RTTHTTP to establish the TCP connection and
then one RTTHTTP to perform the HTTP GET/response over that TCP connection.
Assuming that the servers are sending at the maximum rate possible,
what are the link utilizations for the client links (RC).
The client's utilization = Rbottleneck / RC = 20 / 20 = 1
communicate
peers request service from other
peers, provide service in return to
other peers local or
regional ISP
• self scalability – new peers bring new
service capacity, and new service demands home network content
peers are intermittently connected provider
network datacenter
network
and change IP addresses
• complex management
examples: P2P file sharing (BitTorrent), enterprise
network
streaming (KanKan), VoIP (Skype)
Application Layer: 2-7
File distribution: client-server vs P2P
Q: how much time to distribute file (size F) from one server to
N peers?
• peer upload/download capacity is limited resource
us: server upload
capacity
di: peer i download
file, size F u1 d1 u2 capacity
us d2
server
di
uN network (with abundant
bandwidth) ui
dN
ui: peer i upload
capacity
Introduction: 1-8
File distribution time: client-server
server transmission: must sequentially
send (upload) N file copies:
F
• time to send one copy: F/us us
time to distribute F
to N clients using
P2P approach
DP2P > max{F/us,,F/dmin,,NF/(us + Sui)}
increases linearly in N …
… but so does this, as each peer brings service capacity Application Layer: 2-10
Client-server vs. P2P: example
client upload rate = u, F/u = 1 hour, us = 10u, dmin ≥ us
3.5
P2P
1.5
0.5
0
0 5 10 15 20 25 30 35
N
Application Layer: 2-11
P2P file distribution: BitTorrent
file divided into 256Kb chunks
peers in torrent send/receive file chunks
tracker: tracks peers torrent: group of peers
participating in torrent exchanging chunks of a file
Alice arrives …
… obtains list
of peers from tracker
… and begins exchanging
file chunks with peers in torrent
Internet
video server
client
(stored video)
Main challenges:
server-to-client bandwidth will vary over time, with changing network
congestion levels (in house, access network, network core, video server)
packet loss, delay due to congestion will delay playout, or result in poor
video quality
Application Layer: 2-21
Streaming stored video
Cumulative data
2. video
sent
1. video 3. video received, played out at client
recorded (30 frames/sec)
(e.g., 30 time
network delay
frames/sec) (fixed in this
example)
streaming: at this time, client playing out
early part of video, while server still sending
later part of video
Application Layer: 2-22
Streaming stored video: challenges
continuous playout constraint: during client
video playout, playout timing must match
original timing
• … but network delays are variable (jitter), so will
need client-side buffer to match continuous playout
constraint
other challenges:
• client interactivity: pause, fast-forward, rewind,
jump through video
• video packets may be lost, retransmitted
Application Layer: 2-23
Streaming stored video: playout buffering
constant bit
Cumulative data rate video client video constant bit
transmission reception rate video
playout at client
variable
network
buffered
video
delay
client:
periodically estimates server-to-client bandwidth
consulting manifest, requests one chunk at a time
• chooses maximum coding rate sustainable given current bandwidth
• can choose different coding rates at different points in time (depending
on available bandwidth at time), and from different servers
Application Layer: 2-25
Streaming multimedia: DASH
“intelligence” at client: client
determines ...
• when to request chunk (so that buffer ...
… …
…
manifest file
…
where’s Madmen?
… …
Application Layer: 2-29
Content distribution networks (CDNs)
… …
Internet host-host communication as a service
…
…
DASH server
selected, contacted,
streaming begins
Application Layer: 2-31