**QoS-aware Object Replication in Overlay** **Networks**

**QoS-aware Object Replication in Overlay**

**Networks**

Won J. Jeon, Indranil Gupta, and Klara Nahrstedt

4th International Workshop on Peer-To-Peer Systems (IPTPS ’05)

**Outline**

**Outline**

•

### Introduction

•

### Intractability of the Problem

•

### Centralized Solution

•

### Distributed Solutions

•

### Simulation Results

**Introduction**

**Introduction**

• The goal of the QoS-aware replication problem in this paper is to satisfy access time deadlines for all nodes while minimizing

storage utilization in the overlay.

• To find a solution of the problem in an arbitrary graph is intractable (NP-hard).

• A centralized and two decentralized heuristics are presented

**QoS-Aware Replication in Overlays**

**QoS-Aware Replication in Overlays**

• Consider an arbitrary overlay graph G = (V, E), with V the set of nodes and E ⊂ V × V the set of links between the nodes.

• Each edge e in E is associated with a delay d(e).

• The problem is to assign to each node j a value of X_{j} either 1 or
0 (indicating whether the object is stored at node j or not), in such
a way that

Minimize X

i∈v

X_{i},

so that for all nodes i, d(i, j) ≤ δi.

• where d(i, j) represents the minimum delay of the link from i to j ,which is the closest node to i that also has the object.

• δ_{i} is the deadline required by node i to access the object.

**An Example**

**An Example**

In (a) node 1 does not satisfy its deadline of 5 time units.

In (b) all nodes satisfy their deadline of 5 time units, and storage is also minimized.

**Intractability of the Problem**

**Intractability of the Problem**

**Theorem 1. The Qos-aware object replication problem is NP-hard.**

**Proof. Suppose matrix** A representing all pairs shortest paths, i.e.,
A = {a_{ij}}, where a_{ij} is the delay for the shortest path from the node i
to the node j.

Consider the matrix B = {bij}, where b_{ij} = δi for all j.

In the matrix A^{0} = A − B, where the element a^{0}_{ij} represents the link
delay less δ_{i}.

Construct a final matrix C = {c_{ij}}, where c_{ij} = 1 if a^{0}_{ij} ≤ 0, otherwise it
is 0.

(continue...)

**Intractability of the Problem (Cont.)**

**Intractability of the Problem (Cont.)**

The QoS-aware object replication problem then reduces to finding the minimum set of columns in matrix C, so that the 1’s in those columns cover all rows.

This corresponds to placing an object replica at each of the nodes whose corresponding columns are chosen.

*Thus, the QoS-aware replication problem reduces to solving MINIMUM*
*SET COVER problem for* G. This is know to be NP-hard.

**Centralized Algorithm for Qos-aware** **Object Replication**

**Centralized Algorithm for Qos-aware**

**Object Replication**

1. Collect the link delay d_{ij} for every link e_{ij}.

2. Collect the delay requirement δ_{i} for every node i and construct the
matrix B.

3. Calculate the shortest paths from every node i to j and construct it with the matrix A.

4. Calculate the matrix A^{0} by subtracting B from A.

5. Construct the matrix C by marking every element in A^{0} which is
less than or equal to zero with 1, and with 0 otherwise.

6. Based on the matrix C, find the minimum number of column sets in C covering all the row elements with the mark.

7. Allocate a replica of the object to each node whose column is chosen.

## A **and** A

**and**

^{0}

## A

^{0}

**and** C

**and**

**Optimal Solution of the Example**

**Optimal Solution of the Example**

Selecting the minimum number of column sets to cover all rows with 1’s corresponds to allocating the minimum number of replicas to satisfy the QoS requirement.

If we select the column 0, 1, 3, 8, then the rows covered by them are:

**Calculating the Minimum Set Cover**

**Calculating the Minimum Set Cover**

• The classical heuristic solution is a greedy one.

• Initially, all nodes are marked as not covered.

• Iteratively, find the node with the most (1 hop) neighbors not covered so far.

• Then, place a replica of the object at this node, and mark this node and its (1 hop) neighbors as covered.

• This method is known to be approximable within 1 + ln|S| where S is the number of finite sets.

**Distributed Solutions**

**Distributed Solutions**

• Core-selection Method

• TTL-based Method

**Core-selection Method**

**Core-selection Method**

• Each node always maintains information of which of these immediate neighbors store replicas of the object, and the in-degree of each of these neighbors.

• The node continuously monitors whether there is at least one
object replica either at itself, or at one of its neighbor nodes
reachable through with a delay ≤ δ_{i}.

• If this condition ever becomes false, node i first checks if all its
neighbor nodes j have an i → j delay > δ_{i}; then, node i becomes
a *core* (store an object replica).

• Otherwise, node i selects that neighbor as core that has a delay

≤ δi and has the maximum in-degree.

• This approach attempts to maximize the number of nodes that can access this new replica.

**TTL-based Method**

**TTL-based Method**

• In this approach, a node storing an object replica maintains a list of dependent nodes (which may or may not be immediate

neighbors) that are relying on it for accessing the object.

• If this list becomes empty, the node can delete the object replica.

• Any node that does not have a local replica of the object
periodically creates a *QoS-advert* message contains (a) its δ_{i}
deadline value and (b) *depending-on*, the ID of the node tiat it is
currently depending on (may be empty).

**TTL-based Method (Cont.)**

**TTL-based Method (Cont.)**

• The QoS-advert is broadcast to each of its immediate neighbors
connected by a link with a delay smaller than δ_{i}.

• Each received QoS-advert is re-broadcast by the receiving node j, but only if the QoS value in the QoS-advert message is ≥ the delay on the outgoing link.

• If this condition evaluates to false for all neighbors of j, node j
checks if the *depending-on* field in the message is either empty or
specifies j.

• If either is true, node j replies to the QoS-advert, and this reply is reverse routed.

• Otherwise, node j does nothing.

• If *depending-on* field specified j, the original sender is added to the
dependents list at j, and a local replica of the object is fetched

**TTL-based Method (Cont.)**

**TTL-based Method (Cont.)**

• When a node has sent out a QoS-advert with a non-empty

*depending-on* field, it waits for the node specified therein to send a
reply.

• If no such reply is received (determined by a timeout), another
Qos-advert is sent immediately with the *depending-on* field empty.

• When a node has sent a QoS-advert with an empty *depending-on*

field, it waits to receive replies, makes a decision about whom to
depend on, and sends out a QoS-advert with the *depending-on* field
set.

**Simulation**

**Simulation**

• Generate different P2P overlay network topologies with different number of nodes.

• Use BRITE network topology generator to generate power-law based overlay network topologies.

• QoS parameter(δ) is set to 10.

**Simulation Results**

**Simulation Results**

**Simulation Results (Cont.)**

**Simulation Results (Cont.)**

**Simulation Results (Cont.)**

**Simulation Results (Cont.)**