Abstract—Hybrid content distribution network (HCDN) makes experimental results of our approach. Section VI provides
use of the highly complementary advantages of conventional the conclusions.
CDN (content distribution network) and pure P2P (peer-to-
peer). In HCDN, clients can concurrently retrieve content from
both CDN and P2P networks. In this paper, service II. RELATED WORK
differentiation is formulated as a constraint optimization
In our previous work, we presented the HCDN hybrid
problem, in which two additional factors are taken into
consideration. With the convex optimization theory, two
architecture in [1][5] and evaluated its performance in [6].
bandwidth allocation algorithms, HBAA-P for source peer and Similar works have also been done by Skevik et al in [2],
HBAA-S for surrogate server, are proposed and proved for Huang et al in [3], Xu et al in [7] and Cahill et al in [8]. The
service differentiation in the hybrid architecture. Some main idea of these works is to construct a hybrid architecture
experimental results are illustrated to make sense of the integrating the CDN and P2P in order to improve the content
performance features of our approaches. distribution efficiency. To the best of our knowledge, there
are little works focusing on service differentiation in HCDN
Keywords – service differentiation; bandwidth allocation network, although some preliminary works have been done
algorithm; peer-to-peer network; content distribution network. on service differentiation in pure peer-to-peer network.
An application-layer bandwidth allocation algorithm is
used to determine how a source node N s distributes its
I. INTRODUCTION bandwidth Bs to the competing nodes N i (1 ≤ i ≤ n) . Some
A key challenge for Internet infrastructure has been the existing algorithms are summarized in [9]. A simple
need to deliver increasingly large volume content to a rapidly mechanism is even sharing, in which each competing node
growing user population. CDN and P2P have been playing will be assigned bandwidth xi :
important roles in addressing this challenge. Making use of Bs
the highly complementary advantages of conventional CDN xi = 1≤ i ≤ n (1)
n
and pure P2P, the hybrid content distribution network In addition to provide no service differentiation among
(HCDN) [1][2][3] has been proposed to both reduce the competing nodes, this simple algorithm may cause
deployment cost and provide QoS (quality of service) significant bandwidth wastage. For example, if the download
assurance. In HCDN, a two-level hierarchical architecture is bandwidth of a competing node is lower than its assigned
constructed, and clients can concurrently retrieve content bandwidth, the over-assigned resource will be wasted. To
from both CDN and P2P networks. overcome the bandwidth wastage problem, a mechanism,
The aim of service differentiation is to provide different called resource bidding, is proposed, in which every
quality for users with different priorities. Although many competing node sends a bidding message periodically to
mechanisms [4] have been proposed to support differentiated source node. Let the bidding bandwidth be bi . The assigned
service in network layer, very few have been deployed in
current Internet. Recently, there has been a growing interest bandwidth is denoted as:
in academic and commercial environments for providing ⎧ i −1
⎫
differentiated service in application layer. In this paper, we ⎪ Bs − ∑ x j ⎪
⎪ j =1 ⎪
propose a bandwidth allocation algorithm motivated by the xi = min ⎨bi , ⎬ 1≤ i ≤ n (2)
⎪ n − i + 1 ⎪
objective of supporting service differentiation in HCDN ⎪⎩ ⎪⎭
network.
The remainder of this paper is organized as follows. In To take into consideration the priority Pi of competing node
section II, a summary of related works is provided. In section i , the assigned bandwidth can be further formulated as
III, the model of HCDN is briefly introduced as preliminary follows.
work. In section IV, our proposed bandwidth allocation
algorithm is described in detail. In section V, we show the
1
⎧ ⎛ i −1 ⎞⎫
⎪ Pi ⋅ ⎜⎜ Bs − ∑ x j ⎟⎟ ⎪
⎪ ⎠⎪
xi = min ⎨bi , ⎝ n
j =1
⎬ 1≤ i ≤ n (3)
⎪ ∑ Pj ⎪
⎪ j =i ⎪
⎩ ⎭
However, these mechanisms do not take the competing
nodes’ satisfaction into account. The degree of satisfaction
xi
for node i can be denoted as . To consider both the
bi
index data ■ origin server ● surrogate ○ client
perceived utilities of competing nodes and their priorities,
the resource bidding with priority and utility is presented as Fig.1. Network model of HCDN
the following constraint optimization:
n n
xi
max ∑ [ Pi ⋅ log( + 1)] s.t. ∑ xi ≤ B s , xi ∈ [0, bi ]∀i (4)
i =1 bi i =1 IV. BANDWIDTH ALLOCATION ALGORITHM FOR SERVICE
Some other approaches have also been studied. In [10], DIFFERENTIATION IN HCDN
Wu et al propose an optimal bandwidth allocation algorithm
for service differentiation across multiple peer-to-peer A. Overview
sessions that maximize the sessions’ priority-based utilities. In HCDN, competing clients can concurrently retrieve
In [11], Kumar et al implement file distribution with content from source peers and surrogate servers. The model
application-level differentiated service in a peer-assisted file of bandwidth allocation is shown in Fig.2. Our approach is
distribution system. The main idea is to leverage the divided into two parts: HBAA-P (bandwidth allocation
bandwidth capacity of lower class nodes to provide better algorithm on peer) and HBAA-S (bandwidth allocation
service to higher class nodes. algorithm on server). In addition to the priority Pi and
In this paper, we focus on bandwidth allocation for
service differentiation in the HCDN hybrid architecture. Our bidding value bi , we introduce parameter qi as the quality
main contribution includes: (a) two algorithms, HBAA-P for factor of link between the source peer and client i in
source peer and HBAA-S for surrogate server, are proposed HBAA-P, and parameter D j as the demand factor of file j
and proved for bandwidth allocation; (b) the experimental in HBAA-S.
results show the performance features of our approaches.
x1
2
n
xi when 0 < xi* < bi , we have μi* = 0 from eq. (13), β i* = 0 from
max ∑ [ Pi ⋅ log( qi ⋅ + 1)]
i =1 bi Pi ⋅ qi P ⋅q P ⋅q P b
(5) eq. (14), and < λ * = * i i < i i , xi* = i* − i
N
bi (1 + qi ) xi ⋅ qi + bi bi λ qi
s.t. ∑ xi ≤ B p , xi ∈ [0, bi ] ∀i
i =1 from eq. (11). Therefore, the optimal solution xi* described
With the objective function in (5), the greater factor qi of
in theorem 1 can be achieved in corresponding three cases.
a peer, the higher bandwidth will be allocated for it. □
Theorem 1. The above constraint optimization (5) can be Based on theorem 1, an optimal solution of convex
solved as a convex optimization problem. An optimal problem can be reached by the optimal value of λ * . As
solution is as follows: shown in Table.1, the algorithm HBAA-P is used to resolve
⎧ Pi ⋅ qi the problem according to the KKT conditions.
⎪bi if λ * ≤
⎪ bi (1 + qi ) Table.1. Bandwidth Allocation Algorithm on Peer
⎪⎪ P ⋅q
xi = ⎨0
*
if λ * ≥ i i (6) Algorithm HBAA-P()
⎪ bi
⎪P b Pi ⋅ qi P ⋅q
n
G
⎪ i* − i if < λ* < i i 1. if ( ∑ bi < B p ) { xi = bi , ∀i ; return x ;}
*
⎪⎩ λ qi bi (1 + qi ) bi i =1
Pi ⋅ qi Pi ⋅ qi
where λ * is the optimal value of Lagrangian multiplier λ 2. Ui = , Li = , l=0;
for the first constraint of problem (5). bi bi (1 + qi )
3. Z = {U i } + { Li } ; // Z is in non-increasing order
Proof: To the optimization problem (5), the objective
function is a non-decreasing and concave function of 4. for ( each l <= 2n ){
5. λ = Zl ;
variable xi . This problem is equivalent to a convex G
6. Update_x( λ ); // according to eq. (6), calculate x
optimization with standard form as
n 7. B p = B p − bk ; // the node k is allocated with bk
min − ∑ [ Pi ⋅ log(qi ⋅ xi + bi )] (7) l
G
n
i =1
8. if ( ∑ xi == Bp ) return x ;
i =1
s.t. Β p − ∑ xi ≥ 0 (8) l
i =1
bi − xi ≥ 0 ∀i (9)
9. if ( ∑ xi < B p && l=2n ) { λ * = 0 ; break;}
i =1
xi ≥ 0 ∀i (10) l
10. if ( ∑ xi > B p ){
Let λ * , μi* and β i* be the optimal values of Lagrangian i =1
multipliers λ , μi and β i associated with the corresponding 11. // find λ * between Z l −1 and Z l
constraints (8), (9) and (10), respectively. We also assume 12. for (each node m where U m ≥ Z l −1 and Lm ≤ Z l )
G
x = [ x1* , x2* , ... , xn* ] is an optimal solution to this problem. So, bm
13. { Sum1 + = pm ; Sum2 + = ;}
we can obtain the KKT conditions [13] for this convex qm
problem: Sum1 ;
14. λ* =
Sum2 + B p
n
∑ xi *
≤ B p , xi ≤ bi
*
∀i , xi ≥ 0 ∀i
*
15. break;
i =1
Pi ⋅ qi n n 16. }
= λ * + ∑ μi* − ∑ βi* ∀i (11) 17. }
xi ⋅ qi + bi
*
i =1 i =1
18. Update_x( λ * );
⎛ N
⎞ G
λ ⎜ B p − ∑ xi* ⎟ = 0
*
(12) 19. return x ;
⎝ i =1 ⎠
In algorithm HBAA-P, if there is no congestion, the
μi (bi − xi ) = 0 ∀i
* *
(13)
bandwidth allocated for each node is equal to its bidding
β i* xi* = 0 ∀i (14) value (line 1). Initialize the upper and lower limits according
Three cases can be got: when x = bi , we have βi = 0 from * * theorem 1, and put them into array Z in non-increasing
order (line 2~3). From line 4 to 17, we adjust the λ to use up
i
Pi ⋅ qi n
P ⋅q P ⋅q
eq. (14), and λ * = − ∑ μi * ≤ * i i = i i bandwidth B p .
xi ⋅ qi + bi i =1
*
xi ⋅ qi + bi bi (1 + qi )
from eq. (11); when xi* = 0 , we have μi* = 0 from eq. (13),
Pi ⋅ qi n
P ⋅q P ⋅q C. Bandwidth Allocation Algorithm on Servers
and λ * = + ∑ β i* ≥ * i i = i i from eq. (11);
xi ⋅ qi + bi i =1
*
xi ⋅ qi + bi bi In HCDN, to improve the distribution efficiency, the
surrogate server’s capability should be more consumed by
3
the files which have more requests and scarce peers. To take
the demand degree into consideration, we denote the demand In the algorithm HBAA-S, ∑ xi , j * − bi are dual
j :( i , j )∈S
factor of file j as D j = R j H j (where R j is the number of
1
requests for file j , and H j is the health index [14] which subgradients, θ ( k ) = is step size satisfies the
(1 + k ) ⋅ θ
denotes the number of peers sharing file j in P2P-level following condition:
distribution). Let S denotes the set of pairs (i, j ) that means ∞
for pair (i, j ) . The bandwidth allocation on surrogate server is Table.3. The Subalgorithm of HBAA-S
formulated as following constraint optimization:
xi , j HBAA-S Subalgorithm ()
max ∑ [ Pi ⋅ log( D j ⋅
bi
+ 1)]
( i , j )∈S n
G
1. if ( ∑ bi < Bs ) { xi = bi ∀i ; return x ;}
*
s.t. ∑ xi , j ≤ Bs
(15)
i =1
2. // the elements of S are in non-increasing order
( i , j )∈S
for ( each (i, j ) ∈ S ) {
∑ xi , j ≤ bi ∀i
j :( i , j )∈S Pi ⋅ D j
3. λ= − μi ;
xi , j ≥ 0 ∀(i, j ) ∈ S bi
We consider the equivalent standard minimization form G
4. Update_x( λ ); / /according to eq. (19), calculate x using λ
of the objective function in (15):
G
min − ∑ [ Pi ⋅ log( D j ⋅ xi , j + bi )] (16)
5. if ( ∑ xi , j == Bs ) return x ;
( i , j )∈S
( i , j )∈S
Associating Lagrangian multipliers μi with the second 6. if ( ∑ xi , j < Bs && (i,j) is the end) { λ * = 0 ; break;}
( i , j )∈S
constraint in (15) and using Lagrangian relaxation, the
objective function is transformed to:
n
7. if ( ∑ xi , j > Bs ) {
∑ [( Pi ⋅ log( D j ⋅ xi , j + bi ) − μi xi , j )] − ∑ μibi
( i , j )∈S
− (17)
( i , j )∈S i =1
13. }
s.t. Β s − ∑ xi , j ≥ 0 (18)
14. Update_x( λ * );
( i , j )∈S
G
xi , j ≥ 0 , ∀(i, j ) ∈ S 15. return x ;
6. k++; ∑ xi , j ∗ ≤ Bs
7. } ( i , j )∈S
λ ∗ ≥ 0, xi , j ∗ ≥ 0, βi , j * ≥ 0 ∀(i, j ) ∈ S
4
Pi ⋅ Dj will be allocated for it. It also can be seen that the smaller
∗
− μi = λ * − β i , j* ∀(i, j ) ∈ S (20) bidding value will cause higher satisfaction.
xi , j ⋅ D j + bi
Then, to consider the quality of link, we change the
λ * ( Bs − ∑ xi , j ∗ ) = 0 (21) parameter q from [1, 1, 1, 1, 1] to [2, 3, 4, 7, 10]. As shown
in Fig.3 (b), the greater q will result in higher allocated
( i , j )∈S
0.6
N1
0.6 N1 N1 0.5
N2
N2 N2
N3
N3 N3
0.5 0.5 N4
N4 N4
0.4 N5
Allocated bandwidth(Mbps)
Allocated bandwidth(Mbps)
Allocated bandwidth(Mbps)
N5 N5
0.4 0.4
0.3
0.3 0.3
0.2
0.2 0.2
0.1
0.1 0.1
5
90 70
0
0 0
0 10 20 30 40 50 60 70 80 90 100 110 120 130 140 150 150 200 250 300 350 400 450 500 550 600 150 200 250 300 350 400 450 500 550 600
Index of the competing node Number of total requesting nodes Number of total requesting nodes
(a). With different priorities (b). With different demand factors
Fig.4. Convergence speed of HBAA-S Fig.5. Bandwidth allocation for HBAA-S
0.5
architecture for cost-effective streaming media distribution,”
0.4
Multime-dia Systems, pp. 383-399, Mar. 2006.
[8] Adrian J. Cahill, Cormac J. Sreenan. “An efficient CDN placement
0.3
algorithm for the delivery of high-quality TV content,” the 12th
0.2
annual ACM international conference on Multimedia, New York, NY,
USA , 2004.
0.1
[9] R.T.B. Ma, S.C.M. Lee, J.C.S. Lui, and D.K.Y. Yau, “Incentive and
0.0
Service Differentiation in P2P networks: A Game theoretic approach”,
NQND YQND NQYD YQYD IEEE/ACM Trans Networking, vol. 14, no. 5, pp. 978-991, Oct. 2006.
Fig.6. Effects of the qi and Dj on Satisfaction Degree [10] C.Wu, B.Li, “Diverse: Application-Layer Service Differentiation in
Peer-to-Peer Communications”, IEEE Joutnal On Selected Areas In
Communications, Vol. 25, No. 1, pages 222-234, 2007.
VI. CONCLUSION
[11] Rakesh Kumar, Keith Ross, “Optimal Peer-Assisted File Distribution:
In this article, to achieve service differentiation in HCDN Single and Multi-Class Problems”, Proceedings of INFOCOM, 2005.
hybrid architecture, we propose a bandwidth allocation [12] Cheng-Fu Chou, Ling-Jyh Chen, and Wen-Hui Chiang, “Integrity-
algorithm composed of HBAA-P and HBAA-S. In our aware Bandwidth Guarding Approach in P2P Networks”, IFIP
approaches, the quality factor of link and the demand factor Networking 2007, Atlanta, Georgia, USA,2007.
of file are introduced in HBAA-P and HBAA-S, respectively. [13] S.Boyd, “Convex Optimization”, Cambridge University Press, 2004.
With convex optimization theory, the proof and derivation of [14] Y. Huang, T. T. J. Fu, D. M. Chiu, J. C. S. Lui, and C. Huang,
the approaches are presented. The experimental results show “Challenges, design and analysis of a large-scale p2p vod systems”,
in ACM SIGCOMM, 2008.
that the proposed algorithms have high speed of convergence
[15] N. Z. Shor, “Minimization Methods for Non-Differentiable
and can adapt to dynamic network. We also show the effect Functions”, Springer-Verlag, 1985.