Multimedia Networks - 6 - CDNs and OTT
Multimedia Networks - 6 - CDNs and OTT
Multimedia Networks - 6 - CDNs and OTT
• Introduction
• Content Delivery Networks
• Over-the-top content
2
Content distribution networks
(CDNs)
Content replication Origin server
• Challenging to stream large files in North America
(e.g., video) from single origin
server in real time
• Solution: replicate content at
hundreds of servers throughout
CDN distribution node
Internet
– content downloaded to CDN
servers ahead of time
– placing content “close” to
user avoids impairments
(loss, delay) of sending
content over long paths
– CDN server typically in CDN server
CDN server
edge/access network in S. America CDN server
in Asia
in Europe
1: Introduction 1-3
Content distribution networks
(CDNs)
Origin server
Content replication
in North America
• CDN (e.g., Akamai)
customer is the content
provider (e.g., as.com)
• CDN replicates customers’
CDN distribution node
content in CDN servers.
• when provider updates
content, CDN updates
servers
CDN server
CDN server
in S. America CDN server
in Asia
in Europe
1: Introduction 1-4
Content distribution networks
Use Cases
• Accelerate Web performance
– Content caching reduction of load time
• Ease software updates and downloads
– Distribute software patches and updates (e.g.
mobile OS updates)
• Distribute end-to-end online video
– e.g. Netflix, Youtube
5
CDNs Types
• Pure-play CDN
– ISPs not involved in control and distribution
– Delivery of audio/video “over-the-top” (OTT)
• Use of ISP infrastructure
– e.g. Akamai
• Own infrastructure
– e.g. Limelight, Level 3
• Carrier/Telco CDN:
– Implemented by ISPs
– Reduce the load of the “core” networks and
delay
– Verizon, AT&T, Telefónica
6
CDNs Types (II)
• Managed CDN
– Pure-play CDNs help carriers to build and
manage CDN component in carrier’s network
– CDN managed by CDN provider
– e.g. Limelight Deploy
• Licensed CDN
– Pure-play CDNs provide software for integration,
testing and deployment on the carrier’s
infrastructure
– CDN managed by network operator
– E.g Aura Managed CDN (Akamai), EdgeCast
7
CDNs Types (III)
• Federated CDN
– Interconnection of multiple CDNs
– Compete against pure-play CDNs
– e.g. Cisco and Highwinds federated CDNs
8
CDN Composition
• Organization • Interaction
– Overlay-based protocols
– network approach – Network elements
• Servers (origin and and inter-cache
replication) • Content/services
• Relationship: type
– Client-to-edge-to- – Static
origin – Streaming
– Network element-to- – Dynamic
caching proxy
– Interproxy
9
CDN Relationships:
Client-to-surrogate-to-origin
Origin Origin Origin
Server Server Server
Surrogates
Clients
10
CDN Relationships:
Network-to-caching-proxy
Caching Proxy Array 1 Caching Proxy Array 2
Network elements
Clients
11
CDN Relationships:
Inter-proxy (Array)
Clients
12
CDN Relationships:
Inter-proxy (Mesh)
Caching Caching
Proxy Proxy
13
CDN Request Routing (rfc3568)
www.node3.example.com www.node3.example.com
User IP3 DNS Server IP3 CDN DNS
Server
IP3
connection
CDN Network
Node 1 Node 2 Node 3
15
DNS-based Request Routing
www.example.com
IP DNS Server
User
HTTP
connection Web Server
HTTP
HTTP Redirect
connection
CDN Network
Node 1 Node 2 Node 3
17
URL-Rewrite Request Routing
www.example.com www.example.com
www.example.com
IP DNS Server
User
HTTP
connection Web Server
www.example.com/image.png
www.node1.example.com/image.png
CDN Network
Node 1 Node 2 Node 3
18
CDN Distribution and
Management
• Content selection • Content-sourcing
and delivery – Push-based
– Empirical • Cooperative
– Popularity – Pull-based
• Cooperative
• Replica placement • Non-cooperative
– Single vs Multi-ISP
• Cache management
– Hot-spot
– Intra and inter-
– Tree-based
cluster
– On-demand
– Propagation and
invalidation 19
Cooperative Push-based CDNs
CDN Network
21
Non Cooperative Pull-based
CDNs
• Client requests are directed to their closest
surrogate servers.
• If there is a cache miss, surrogate servers
pull content from the origin server.
• e.g. Akamai, Mirror Image
• Drawback optimal server not always
selected
22
Non-Cooperative Pull-based
CDNs
Pull
Content
Origin Server
Query
Content
Cache
Miss
Client
CDN Network
23
Cooperative Pull-based CDNs
24
Cooperative Pull-based CDNs
Pull
Content
Origin Server
Query
Content
Cache
Miss
Client
CDN Network
25
Cache Organization and
Managment
• Content management is essential for CDNs
– Minimize latency
– Increase hit-ratio
26
Cache Organization and
Managment
• Caching techniques:
– Intra-cluster:
• Query-based
• Digest-based
• Directory-based
• Hashing-based
• Semi-Hashing-based
– Inter-cluster
• Query-based
27
Query-based scheme
Cache
Miss
Cache
Miss
Query Miss
Broadcast reply
Content
Miss
reply
Query
Content
Cache
Miss
Client
28
Query-based scheme
• Problems:
– Increment in bandwidth usage
• Extra traffic broadcasted to cooperating servers
– Increments in latency
• First server must wait until the last «miss reply» is
received to conclude that content is not avialable
– Implementation Overhead
29
Digest-based scheme (Query)
S1 S2 S3
Query
Content 4
Content 4
Query
Digest
Content 4
Content 1 S2
Content 2 S2
Content 3 S1 Cache Content 4
Content 4 S3 Miss
Client
30
Digest-based scheme (Update)
S1 S2 S3
New content 5
Content-update
broadcast
Digest
Content 1 S2
S4 Content 2 S2
Content 3 S1
Content 4 S3
Content 5 S1
31
Digest-based scheme
32
Directory-based scheme
(Query)
S1 S2 S3
Directory
Content 4 Query
search Content 4
Content 4
Query
Server S3
Digest Content 4
Content 1 S2
Content 2 S2 Cache Content 4
Content 3 S1 Miss
Client
Content 4 S3
33
Directory-based scheme
(Update)
S1 S2 S3
New content 5
Content-update
Digest
Content 1 S2
Directory Content 2 S2
Content 3 S1
Content 4 S3
Content 5 S1
34
Directory-based scheme
35
Hash-based scheme (Query)
S1 S2 S3
Query Content 4
Content 4
(request route)
Query
hash(content
Content 4
name) = S3
Cache
Miss
Client
36
Hash-based scheme (Update)
S1 S2 S3
New content 5
Hash(IP server
+content_name) Content placement
=S3
S4
37
Hash-based scheme
39
Caching schemes (additional
considerations)
• Hash-based scheme not appropriate for
inter-cluster caching
– Representative CDN servers of clusters are
geographically distributed
• Digest-based and directory-based not
suitable for inter-cluster:
– Servers have to maintain huge content digest
including information of servers in other clusters
• Query-based is the only scheme suitable for
inter-cluster caching.
40
Caching schemes (Big picture)
Cluster 1 Cluster 2
(intra-cluster hash/semi- (intra-cluster hash/semi-
hash) hash)
Cluster 3
(intra-cluster hash/semi-
hash)
41
Cache update
• Time-driven approach
• Origin server marks :
– Which contents are cacheable
– How long each content is considered “fresh”
– When to check back for updated content
• Unnecessary update traffic when content
changes are minimal
43
Propagation update
44
On-demand update
45
Invalidation update
46
CDN Performance Measurement
47
CDN Traffic Monitoring
50
CDNs Summary (II)
CDN Surrogate Content Cache
Placement outsourcing
Akamai Multi ISP; Non-cooperative Intra and inter-cluster
Hotspot pull-based • Update
• Propagation
• On-demand
Netflix registration,
accounting servers
3. Manifest file
2. User browses returned for
requested video Limelight
Netflix video 2
3 CDN
1
1. User manages
Netflix account
Level-3
4. Streaming CDN
1: Introduction 1-53
Over-The-Top Content (OTT)
54
Over-The-Top Content (OTT)
55
Over-The-Top Messaging (OTT)
56
XMPP
57
XMPP Architecture
58
XMPP Architecture
Client 2 Client 5
Federation Server 3
between
servers
Client 3 Client 4 59
XMPP Addressing
• Resources:
– For each connection between client and server a
resource identifier is assigned
– Used for routing traffic to each concurrent
connection
– E.g. user@domain/home
– Each resource is a different PoP (Point-of-
Presence) with its own state and location
61
XMPP Communications
• <message/>
– Basic push method for getting information from
one place to another
– Messages are typically NOT acknowledged
• Message Types:
– Normal similar to e-mail
– Chat real-time messages between 2 users
– Groupchat multi-chat room
– Headline alerts and notifications(no response)
– Error returned when error detected
63
XMPP Message Example
<message from=“user1@domain/foo"
to=“user2@domain"
type="chat">
<body>Hello World</body>
<subject>Query</subject>
</message>
64
XMPP Presence
<presence from=“user1@domain/mobile">
<show>xa</show>
<status>Custom state </status>
</presence>
• Show values
• away The entity or resource is temporarily away.
• chat The entity or resource is actively interested in
chatting.
• dnd The entity or resource is busy (dnd = "Do Not
Disturb").
• xa The entity or resource is away for an extended
period (xa = "eXtended Away").
66
XMPP IQ
67
XMPP IQ Example
<iq from=“user1@domain/pc"
id="rr82a1z7"
to=“user1@domain" type="get"> <query
xmlns="jabber:iq:roster"/> </iq>
68
Jingle
• Jingle is an extension of XMPP to establish audio
and video sessions
• Similar to SIP
– The initiator offers to start a session to the responder
– Responder answers the offer either accepting it or
declining it
• Each offer comprises 2 parts:
– Application Type what content is going to be
exchanged? E.g. voice via RTP
– Transport Method How data is sent. E.g. UDP
69
Jingle Session Establishment
Initiator Responder
Accept Offer
Media Exchange
Terminate session
70
Jingle Example
<iq from=“user1@domain/mobile"
id="v73hwcx9" to=“user2@domain/home" type="set">
<jingle xmlns="urn:xmpp:jingle:1"
action="session-initiate"
initiator=“user1@domain/mobile“
sid="a73sjjvkla37jfea">
<content creator="initiator" name="voice">
72
OTT Video and Audio Services
73
WebRTC
74
WebRTC
• Components:
– Video Engine
• VP8 (WebM) video codec
• Dynamic Video Jitter Buffer
• Image Enhancements
– Noise reduction
– Voice Engine
• Codecs
– iSAC (variable bitrate 12-52 kbps)
– iLBC (bitrate 15.2 kbps/13.33 kbps)
– Opus (variable bitrate 6-510 kbps(
• Dynamic Audio Jitter Buffer
75
WebRTC
• Components:
– Transport/Session Modules
• RTP network stack
• STUN/ICE
– NAT session establishment and connectivity
• Session Management:
– Abstract layer for call setup and management
– Protocol implementation dependent on developer
76
WebSockets (WS)
77
SIP over WebSocket
78
SIP over WebSocket
Session Establishment
GET / HTTP/1.1
Host: sip-ws.example.com
Upgrade: websocket
Connection: Upgrade
Sec-WebSocket-Key: dGhlIHNhbXBsZSBub25jZQ==
Origin: http://www.example.com
Sec-WebSocket-Protocol: sip
Sec-WebSocket-Version: 13
HTTP/1.1 101 Switching Protocols
Upgrade: websocket
Connection: Upgrade
Sec-WebSocket-Accept: s3pPLMBiTxaQ9kYGzzhZRbK+xOo=
Sec-WebSocket-Protocol: sip
79
SIP over WS
Invite through Proxy
Alice proxy.example.com Bob
SIP WSS SIP UDP
INVITE (1)
200 OK (4)
200 OK (5)
ACK (6)
ACK (7)
Bidirectional RTP
80
SIP WS:Invite through Proxy
1
INVITE sip:[email protected] SIP/2.0
Via: SIP/2.0/WSS df7jal23ls0d.invalid;branch=z9hG4bK56sdasks
From: sip:[email protected];tag=asdyka899
To: sip:[email protected]
Call-ID: asidkj3ss
CSeq: 1 INVITE
Max-Forwards: 70
Supported: path, outbound, gruu
Route: <sip:proxy.example.com:443;transport=ws;lr>
Contact: <sip:[email protected];gr=urn:uuid:f81-7dec-14a06cf1;ob>
Content-Type: application/sdp
2
SIP/2.0 100 Trying
Via: SIP/2.0/WSS df7jal23ls0d.invalid;branch=z9hG4bK56sdasks
From: sip:[email protected];tag=asdyka899
To: sip:[email protected]
Call-ID: asidkj3ss
CSeq: 1 INVITE
81
SIP WS:Invite through Proxy
3
INVITE sip:[email protected]:5060 SIP/2.0
Via: SIP/2.0/UDP proxy.example.com;branch=z9hG4bKhjhjqw32c
Via: SIP/2.0/WSS df7jal23ls0d.invalid;branch=z9hG4bK56sdasks
Record-Route: <sip:proxy.example.com;transport=udp;lr>,
<sip:[email protected]:443;transport=ws;lr>
From: sip:[email protected];tag=asdyka899
To: sip:[email protected]
Call-ID: asidkj3ss
CSeq: 1 INVITE
Max-Forwards: 69
Supported: path, outbound, gruu
Contact: <sip:[email protected];gr=urn:uuid:f81-7dec-14a06cf1;ob>
Content-Type: application/sdp
82
SIP WS: Invite through Proxy
4
SIP/2.0 200 OK
Via: SIP/2.0/UDP proxy.example.com;branch=z9hG4bKhjhjqw32c
;received=192.0.2.10
Via: SIP/2.0/WSS df7jal23ls0d.invalid;branch=z9hG4bK56sdasks
Record-Route: <sip:proxy.example.com;transport=udp;lr>,
<sip:[email protected]:443;transport=ws;lr>
From: sip:[email protected];tag=asdyka899
To: sip:[email protected];tag=bmqkjhsd
Call-ID: asidkj3ss
CSeq: 1 INVITE
Contact: <sip:[email protected]:5060;transport=udp>
Content-Type: application/sdp
83
SIP WS: Invite through Proxy
5
SIP/2.0 200 OK
Via: SIP/2.0/WSS df7jal23ls0d.invalid;branch=z9hG4bK56sdasks
Record-Route: <sip:proxy.example.com;transport=udp;lr>,
<sip:[email protected]:443;transport=ws;lr>
From: sip:[email protected];tag=asdyka899
To: sip:[email protected];tag=bmqkjhsd
Call-ID: asidkj3ss
CSeq: 1 INVITE
Contact: <sip:[email protected]:5060;transport=udp>
Content-Type: application/sdp
6
ACK sip:[email protected]:5060;transport=udp SIP/2.0
Via: SIP/2.0/WSS df7jal23ls0d.invalid;branch=z9hG4bKhgqqp090
Route: <sip:[email protected]:443;transport=ws;lr>,
<sip:proxy.example.com;transport=udp;lr>,
From: sip:[email protected];tag=asdyka899
To: sip:[email protected];tag=bmqkjhsd
Call-ID: asidkj3ss
CSeq: 1 ACK
Max-Forwards: 70 84
SIP WS: Invite through Proxy
7
ACK sip:[email protected]:5060;transport=udp SIP/2.0
Via: SIP/2.0/UDP
proxy.example.com;branch=z9hG4bKhwpoc80zzx
Via: SIP/2.0/WSS
df7jal23ls0d.invalid;branch=z9hG4bKhgqqp090
From: sip:[email protected];tag=asdyka899
To: sip:[email protected];tag=bmqkjhsd
Call-ID: asidkj3ss
CSeq: 1 ACK
Max-Forwards: 69
85
OTT: WhatsApp Case Study
86
OTT: WhatsApp Case Study
87
OTT: WhatsApp Case Study