30
Altruistic Routing in P2P Networks: Solutions and Problems Sukumar Ghosh Alina Bejan Amlan Bhattacharya University of Iowa

Altruistic Routing in P2P Networks: Solutions and Problems Sukumar Ghosh Alina Bejan Amlan Bhattacharya University of Iowa

Embed Size (px)

Citation preview

Page 1: Altruistic Routing in P2P Networks: Solutions and Problems Sukumar Ghosh Alina Bejan Amlan Bhattacharya University of Iowa

Altruistic Routing in P2P Networks: Solutions and

Problems

Sukumar GhoshAlina Bejan

Amlan Bhattacharya

University of Iowa

Page 2: Altruistic Routing in P2P Networks: Solutions and Problems Sukumar Ghosh Alina Bejan Amlan Bhattacharya University of Iowa

The University of Iowa 2

Background

Page 3: Altruistic Routing in P2P Networks: Solutions and Problems Sukumar Ghosh Alina Bejan Amlan Bhattacharya University of Iowa

The University of Iowa 3

Background

Structured P2P networks provide a flat

response to query processing.

Traffic flow in P2P networks exhibits a

degree of variability as supported by various

measurements, but routing is immune to

traffic flow patterns.

Page 4: Altruistic Routing in P2P Networks: Solutions and Problems Sukumar Ghosh Alina Bejan Amlan Bhattacharya University of Iowa

The University of Iowa 4

Smart routing

To optimize “routing cost” the network must

reduce the latency of the frequently used

routes, perhaps at the expense of an

increased latency in the rarely used routes.

Page 5: Altruistic Routing in P2P Networks: Solutions and Problems Sukumar Ghosh Alina Bejan Amlan Bhattacharya University of Iowa

The University of Iowa 5

Routing cost

Routing cost = f(i,j) * h(i,j)i,j

f(i,j) = traffic between i,jh(i,j) = hop count between i,j

Page 6: Altruistic Routing in P2P Networks: Solutions and Problems Sukumar Ghosh Alina Bejan Amlan Bhattacharya University of Iowa

The University of Iowa 6

Flat routing0

32

1648

f(0,32) >> f(16,48)

Page 7: Altruistic Routing in P2P Networks: Solutions and Problems Sukumar Ghosh Alina Bejan Amlan Bhattacharya University of Iowa

The University of Iowa 7

Smart routing

0

32

1648

f(0,32) >> f(16,48)

Page 8: Altruistic Routing in P2P Networks: Solutions and Problems Sukumar Ghosh Alina Bejan Amlan Bhattacharya University of Iowa

The University of Iowa 8

Goal of this exercise

How can processes in a P2P network

spontaneously “tweak” their routing

tables to optimize the routing cost?

We studied this on Chord (Stoica et al)

Page 9: Altruistic Routing in P2P Networks: Solutions and Problems Sukumar Ghosh Alina Bejan Amlan Bhattacharya University of Iowa

The University of Iowa 9

The Model

N processes 0 through N-1(N=2k). Each

process i has k=log N fingers pointing to

(i+1, i+2, i+4, .. i+2k-1)

Each process i has an additional k

fingers (1≤k≤log N)that will act as routing

cache

Page 10: Altruistic Routing in P2P Networks: Solutions and Problems Sukumar Ghosh Alina Bejan Amlan Bhattacharya University of Iowa

The University of Iowa 10

The Model

For a given packet, if a node has a routing

cache entry points to the destination of a

packet (cache hit), then that packet will

reach the destination in the next hop.

Otherwise it will follow the traditional Chord

route

Page 11: Altruistic Routing in P2P Networks: Solutions and Problems Sukumar Ghosh Alina Bejan Amlan Bhattacharya University of Iowa

The University of Iowa 11

Revisiting Chord routing

Search in finger table for the nodes which most immediately precedes id

Invoke find_successor from that node

Greedy routing

No of messages O(log N)

Page 12: Altruistic Routing in P2P Networks: Solutions and Problems Sukumar Ghosh Alina Bejan Amlan Bhattacharya University of Iowa

The University of Iowa 12

Example of Cache hit

Due to the presence of the cache entry at node 42, packets from node 8 reach the destination in 2 hops instead of 3.

Page 13: Altruistic Routing in P2P Networks: Solutions and Problems Sukumar Ghosh Alina Bejan Amlan Bhattacharya University of Iowa

The University of Iowa 13

The strategies

The routing cost will very much depend on

on the content of the routing caches. What

routes will be cached by a node? We look

into two strategies:

(a) selfish (b) altruistic

Page 14: Altruistic Routing in P2P Networks: Solutions and Problems Sukumar Ghosh Alina Bejan Amlan Bhattacharya University of Iowa

The University of Iowa 14

A selfish strategy

For any node, define a top destination

as one to which the traffic flow is “high”. Then

each node will orient its cache entries

towards its own top destinations.

What is the impact of this strategy?

Page 15: Altruistic Routing in P2P Networks: Solutions and Problems Sukumar Ghosh Alina Bejan Amlan Bhattacharya University of Iowa

The University of Iowa 15

P2P traffic

Node rank

Traffic flow

Page 16: Altruistic Routing in P2P Networks: Solutions and Problems Sukumar Ghosh Alina Bejan Amlan Bhattacharya University of Iowa

The University of Iowa 16

Analysis hint

A

B

Length of route will depend

on the possibility of a cache hit

at the current node

Let h = no of top destinations

and k = no of cache entries.

Assume the top destinations

are randomly distributed over

the key space

(k << h << N)

Page 17: Altruistic Routing in P2P Networks: Solutions and Problems Sukumar Ghosh Alina Bejan Amlan Bhattacharya University of Iowa

The University of Iowa 17

Analysis hint

A

B

Number of hops that a packet towards

one of the top (h-k) destinations will

take before a cache hit follows a

geometric distribution. Probability of a

cache hit in r hops =

(k/(N-1)).(1-k/(N-1))r-2

Top k destinations will be reached in one hop

Page 18: Altruistic Routing in P2P Networks: Solutions and Problems Sukumar Ghosh Alina Bejan Amlan Bhattacharya University of Iowa

The University of Iowa 18

Analysis hint

A

B

Expected number of hops for cache hit =

(N-1)/k.

This is bad. Fortunately, the bound

will not exceed log N due to the

underlying Chord routing.

When k << h <<N, improvement

due to the selfish strategy is

marginal.

Page 19: Altruistic Routing in P2P Networks: Solutions and Problems Sukumar Ghosh Alina Bejan Amlan Bhattacharya University of Iowa

The University of Iowa 19

An altruistic strategy

Each node will orient its routing cache entries

towards its top destinations of other

nodes only.

How does this work?

Page 20: Altruistic Routing in P2P Networks: Solutions and Problems Sukumar Ghosh Alina Bejan Amlan Bhattacharya University of Iowa

The University of Iowa 20

Analysis hint

is a hot spot

Poor cache hit Better cache hitk=2 k=2

Page 21: Altruistic Routing in P2P Networks: Solutions and Problems Sukumar Ghosh Alina Bejan Amlan Bhattacharya University of Iowa

The University of Iowa 21

Analysis hint

A

B

C

D

Hot spots of A

Hot spots of B

Hot spots of C

Packets from A, B, C contend

for the cache entries of D. 32

48

56

0

16

Page 22: Altruistic Routing in P2P Networks: Solutions and Problems Sukumar Ghosh Alina Bejan Amlan Bhattacharya University of Iowa

The University of Iowa 22

Analysis hint

Expected number of hops that a packet

towards one of the top h destinations will

take before a cache hit occurs = (1+h/k)

Whenever a packet to a destination node

ranks among the top k entries of another

Node in its route, a cache hit occurs.

Page 23: Altruistic Routing in P2P Networks: Solutions and Problems Sukumar Ghosh Alina Bejan Amlan Bhattacharya University of Iowa

The University of Iowa 23

Analysis hint

For small values of h the expected

hop count is better than that for the

selfish protocol. Furthermore, if a

fraction of the nodes is active at any

time, then the expected time for cache

hit = 1+ h/k

Page 24: Altruistic Routing in P2P Networks: Solutions and Problems Sukumar Ghosh Alina Bejan Amlan Bhattacharya University of Iowa

The University of Iowa 24

Sample comparison

Hop count

= 1

Hop count

= 0.5

Hop count

= 0.1

Original Chord 10 10 10

altruistic 10 7 3

selfish 9.3 9.3 9.3

N = 1,000,000 h = 240 k = log N = 20

Page 25: Altruistic Routing in P2P Networks: Solutions and Problems Sukumar Ghosh Alina Bejan Amlan Bhattacharya University of Iowa

The University of Iowa 25

Now, the problem is

Why will all nodes agree to run the altruistic protocol?

Some may cheat by running a selfish version, and get

an unfair advantage. This may make every node think:

“may be many others are running the selfish

version. Let me stop being altruistic.”

Page 26: Altruistic Routing in P2P Networks: Solutions and Problems Sukumar Ghosh Alina Bejan Amlan Bhattacharya University of Iowa

The University of Iowa 26

Now, the problem is

The system will gravitate towards an inferior

equilibrium. Are their ways to force the system

to a superior equilibrium?

Can it be viewed as a stabilization problem?

Page 27: Altruistic Routing in P2P Networks: Solutions and Problems Sukumar Ghosh Alina Bejan Amlan Bhattacharya University of Iowa

The University of Iowa 27

Comparison with Code stabilization

(Freiling & Ghosh SSS 2005)

However, processes need to cooperate. To force non-cooperating

processes to cooperate, penalties / incentives are needed.

All processes runa predefined code

Some codes have been corrupted

recovery

corruption

Page 28: Altruistic Routing in P2P Networks: Solutions and Problems Sukumar Ghosh Alina Bejan Amlan Bhattacharya University of Iowa

The University of Iowa 28

Mandating externally imposed behavior

N processes 0 through N-1 each runs a program P

A fraction of them do not cooperate and run a program P’≠ P

We want all of them to eventually run the same program P

Issue 1. How to detect deviations?

Issue 2 How to develop a system of penalties / incentives?

Issue 3. Quantifying resilience to deviations

Page 29: Altruistic Routing in P2P Networks: Solutions and Problems Sukumar Ghosh Alina Bejan Amlan Bhattacharya University of Iowa

The University of Iowa 29

Conclusion

Many of these are application dependent

Non-cooperative behaviors add new challenges

to the problems of self-stabilization / self-

organization

Page 30: Altruistic Routing in P2P Networks: Solutions and Problems Sukumar Ghosh Alina Bejan Amlan Bhattacharya University of Iowa

The University of Iowa 30

Questions?