51
The Forgiving Graph: A Low-Stretch Distributed Data Structure Tom Hayes Jared Saia Amitabh Trehan University of New Mexico

The Forgiving Graph: A Low-Stretch Distributed Data Structureamitabh/pubs/SelfHealing...Model • Start: a network G. • An adversary inserts or deletes nodes . • After each node

  • Upload
    others

  • View
    3

  • Download
    0

Embed Size (px)

Citation preview

Page 1: The Forgiving Graph: A Low-Stretch Distributed Data Structureamitabh/pubs/SelfHealing...Model • Start: a network G. • An adversary inserts or deletes nodes . • After each node

The Forgiving Graph:A Low-Stretch

Distributed Data Structure

Tom HayesJared Saia

Amitabh Trehan

University of New Mexico

Page 2: The Forgiving Graph: A Low-Stretch Distributed Data Structureamitabh/pubs/SelfHealing...Model • Start: a network G. • An adversary inserts or deletes nodes . • After each node

PODC’ 09 Amitabh Trehan

Epic Fail

• Twitter, August 6, 2009

• Facebook, August 6, 2009

• Skype, August 15, 2007

Page 3: The Forgiving Graph: A Low-Stretch Distributed Data Structureamitabh/pubs/SelfHealing...Model • Start: a network G. • An adversary inserts or deletes nodes . • After each node

PODC’ 09 Amitabh Trehan

Self-Healing

• Brain: component fails, brain rewires and does without it

• Computer networks: components fail, network fails until components fixed.

Page 4: The Forgiving Graph: A Low-Stretch Distributed Data Structureamitabh/pubs/SelfHealing...Model • Start: a network G. • An adversary inserts or deletes nodes . • After each node

PODC’ 09 Amitabh Trehan

Ensuring Robustness

• Want to ensure that our network can recover from a number of node failures.

• Idea: build some redundancy into the network?

• Example: Connectivity

• Use k-connected graph.

• Price: degree must be at least k.

Page 5: The Forgiving Graph: A Low-Stretch Distributed Data Structureamitabh/pubs/SelfHealing...Model • Start: a network G. • An adversary inserts or deletes nodes . • After each node

PODC’ 09 Amitabh Trehan

Ensuring Robustness

• Want to ensure that our network can recover from a number of node failures.

• Idea: build some redundancy into the network?

• Example: Connectivity

• Use k-connected graph.

• Price: degree must be at least k.

Expensive!

Page 6: The Forgiving Graph: A Low-Stretch Distributed Data Structureamitabh/pubs/SelfHealing...Model • Start: a network G. • An adversary inserts or deletes nodes . • After each node

PODC’ 09 Amitabh Trehan

Model

• Start: a network G.

• An adversary inserts or deletes nodes .

• After each node addition/deletion, we can add and/or drop some edges between pairs of nearby nodes, to “heal” the network.

Page 7: The Forgiving Graph: A Low-Stretch Distributed Data Structureamitabh/pubs/SelfHealing...Model • Start: a network G. • An adversary inserts or deletes nodes . • After each node

PODC’ 09 Amitabh Trehan

Page 8: The Forgiving Graph: A Low-Stretch Distributed Data Structureamitabh/pubs/SelfHealing...Model • Start: a network G. • An adversary inserts or deletes nodes . • After each node

PODC’ 09 Amitabh Trehan

Page 9: The Forgiving Graph: A Low-Stretch Distributed Data Structureamitabh/pubs/SelfHealing...Model • Start: a network G. • An adversary inserts or deletes nodes . • After each node

PODC’ 09 Amitabh Trehan

Page 10: The Forgiving Graph: A Low-Stretch Distributed Data Structureamitabh/pubs/SelfHealing...Model • Start: a network G. • An adversary inserts or deletes nodes . • After each node

PODC’ 09 Amitabh Trehan

Page 11: The Forgiving Graph: A Low-Stretch Distributed Data Structureamitabh/pubs/SelfHealing...Model • Start: a network G. • An adversary inserts or deletes nodes . • After each node

PODC’ 09 Amitabh Trehan

Page 12: The Forgiving Graph: A Low-Stretch Distributed Data Structureamitabh/pubs/SelfHealing...Model • Start: a network G. • An adversary inserts or deletes nodes . • After each node

PODC’ 09 Amitabh Trehan

Page 13: The Forgiving Graph: A Low-Stretch Distributed Data Structureamitabh/pubs/SelfHealing...Model • Start: a network G. • An adversary inserts or deletes nodes . • After each node

PODC’ 09 Amitabh Trehan

Page 14: The Forgiving Graph: A Low-Stretch Distributed Data Structureamitabh/pubs/SelfHealing...Model • Start: a network G. • An adversary inserts or deletes nodes . • After each node

PODC’ 09 Amitabh Trehan

Page 15: The Forgiving Graph: A Low-Stretch Distributed Data Structureamitabh/pubs/SelfHealing...Model • Start: a network G. • An adversary inserts or deletes nodes . • After each node

PODC’ 09 Amitabh Trehan

Page 16: The Forgiving Graph: A Low-Stretch Distributed Data Structureamitabh/pubs/SelfHealing...Model • Start: a network G. • An adversary inserts or deletes nodes . • After each node

PODC’ 09 Amitabh Trehan

Page 17: The Forgiving Graph: A Low-Stretch Distributed Data Structureamitabh/pubs/SelfHealing...Model • Start: a network G. • An adversary inserts or deletes nodes . • After each node

PODC’ 09 Amitabh Trehan

Page 18: The Forgiving Graph: A Low-Stretch Distributed Data Structureamitabh/pubs/SelfHealing...Model • Start: a network G. • An adversary inserts or deletes nodes . • After each node

PODC’ 09 Amitabh Trehan

Page 19: The Forgiving Graph: A Low-Stretch Distributed Data Structureamitabh/pubs/SelfHealing...Model • Start: a network G. • An adversary inserts or deletes nodes . • After each node

PODC’ 09 Amitabh Trehan

Page 20: The Forgiving Graph: A Low-Stretch Distributed Data Structureamitabh/pubs/SelfHealing...Model • Start: a network G. • An adversary inserts or deletes nodes . • After each node

PODC’ 09 Amitabh Trehan

Page 21: The Forgiving Graph: A Low-Stretch Distributed Data Structureamitabh/pubs/SelfHealing...Model • Start: a network G. • An adversary inserts or deletes nodes . • After each node

PODC’ 09 Amitabh Trehan

Page 22: The Forgiving Graph: A Low-Stretch Distributed Data Structureamitabh/pubs/SelfHealing...Model • Start: a network G. • An adversary inserts or deletes nodes . • After each node

PODC’ 09 Amitabh Trehan

Page 23: The Forgiving Graph: A Low-Stretch Distributed Data Structureamitabh/pubs/SelfHealing...Model • Start: a network G. • An adversary inserts or deletes nodes . • After each node

PODC’ 09 Amitabh Trehan

Page 24: The Forgiving Graph: A Low-Stretch Distributed Data Structureamitabh/pubs/SelfHealing...Model • Start: a network G. • An adversary inserts or deletes nodes . • After each node

PODC’ 09 Amitabh Trehan

And so on...

Page 25: The Forgiving Graph: A Low-Stretch Distributed Data Structureamitabh/pubs/SelfHealing...Model • Start: a network G. • An adversary inserts or deletes nodes . • After each node

Two GraphsG’: graph of only insertions

and original nodesG: present state

of network

Page 26: The Forgiving Graph: A Low-Stretch Distributed Data Structureamitabh/pubs/SelfHealing...Model • Start: a network G. • An adversary inserts or deletes nodes . • After each node

PODC’ 09 Amitabh Trehan

Goals

• Ensure connectivity.

• Healing should be very fast.

• If vertex v starts with degree d, then its degree should never be much more than d.

• Distance between any two nodes shouldn’t increase by too much.

Page 27: The Forgiving Graph: A Low-Stretch Distributed Data Structureamitabh/pubs/SelfHealing...Model • Start: a network G. • An adversary inserts or deletes nodes . • After each node

PODC’ 09 Amitabh Trehan

A series of unfortunate events

Page 28: The Forgiving Graph: A Low-Stretch Distributed Data Structureamitabh/pubs/SelfHealing...Model • Start: a network G. • An adversary inserts or deletes nodes . • After each node

PODC’ 09 Amitabh Trehan

Main Result• A distributed algorithm, Forgiving Graph

such that:

• Degree increase: Degree of node in G ≤ 3 times degree in G’

G G’

5 3

Page 29: The Forgiving Graph: A Low-Stretch Distributed Data Structureamitabh/pubs/SelfHealing...Model • Start: a network G. • An adversary inserts or deletes nodes . • After each node

PODC’ 09 Amitabh Trehan

Main Result (Contd..)• Stretch: Distance between any two nodes

in G ≤ log n times their distance in G’

G G’

u uv v

d(u,v) = 5 d(u,v) = 3

Page 30: The Forgiving Graph: A Low-Stretch Distributed Data Structureamitabh/pubs/SelfHealing...Model • Start: a network G. • An adversary inserts or deletes nodes . • After each node

PODC’ 09 Amitabh Trehan

Main Result (Contd..)

• Cost: Repair of node of degree d requires at most O(d logn) messages of length O(log2n) and time O(log d log n)

Page 31: The Forgiving Graph: A Low-Stretch Distributed Data Structureamitabh/pubs/SelfHealing...Model • Start: a network G. • An adversary inserts or deletes nodes . • After each node

PODC’ 09 Amitabh Trehan

Main Result • A distributed algorithm, Forgiving

Graph such that:

• Degree of node in G ≤ 3 times degree in G’

• Distance between any two nodes in G ≤ log n times their distance in G’

• Cost: Repair of node of degree d requires at most O(d logn) messages of length O(log2n) and time O(log d log n)

Matching lower bound}

Page 32: The Forgiving Graph: A Low-Stretch Distributed Data Structureamitabh/pubs/SelfHealing...Model • Start: a network G. • An adversary inserts or deletes nodes . • After each node

PODC’ 09 Amitabh Trehan

FG extends Forgiving Tree[PODC ’08]

• Requires no initialization (saves O(|E| log n) messages)

• Handles insertions

• Keeps stretch small, not just diameter

• Introduces new techniques e.g. hafts

Page 33: The Forgiving Graph: A Low-Stretch Distributed Data Structureamitabh/pubs/SelfHealing...Model • Start: a network G. • An adversary inserts or deletes nodes . • After each node

PODC’ 09 Amitabh Trehan

The FG algorithm: Outline

• Node inserted without restrictions.

• When a node is deleted, replace it by a half-full tree(described later) of “virtual nodes”.

• If two half-full trees become neighbors, ‘merge’ them to form a new half-full tree.

• Somehow the surviving real nodes simulate the virtual nodes

Page 34: The Forgiving Graph: A Low-Stretch Distributed Data Structureamitabh/pubs/SelfHealing...Model • Start: a network G. • An adversary inserts or deletes nodes . • After each node

PODC’ 09 Amitabh Trehan

Replacing v by a Reconstruction Tree (RT) of virtual nodes (in oval). The ‘real’

neighbors are the leaves of the tree.

Merging two reconstruction trees on deletion of x

ev

a

b

c d ef

g

a

ea b c d f g

dfb

c

q

l

no

n

l

m

m

pq

rx

pq

nl

p q ro

o

nl m

m

p

Page 35: The Forgiving Graph: A Low-Stretch Distributed Data Structureamitabh/pubs/SelfHealing...Model • Start: a network G. • An adversary inserts or deletes nodes . • After each node

PODC’ 09 Amitabh Trehan

Virtual Nodes

• A virtual node has degree at most 3, since internal node of a binary tree.

• Each real node will simulate at most one virtual node per neighbor.

• After any sequence of deletions, the distance between two nodes can only increase by a factor of the longest path in the largest RT i.e. log n.

Page 36: The Forgiving Graph: A Low-Stretch Distributed Data Structureamitabh/pubs/SelfHealing...Model • Start: a network G. • An adversary inserts or deletes nodes . • After each node

PODC’ 09 Amitabh Trehan

Half-Full Trees (hafts)

• A rooted binary tree in which every non-leaf node v has the following properties:

• v has exactly two children.

• The left child of v is the root of a complete binary subtree containing at least half of v’s children.

Spine nodePrimaryroot

k

T1

T2

TTk!1

Page 37: The Forgiving Graph: A Low-Stretch Distributed Data Structureamitabh/pubs/SelfHealing...Model • Start: a network G. • An adversary inserts or deletes nodes . • After each node

Seven Samurai:the first seven hafts

Page 38: The Forgiving Graph: A Low-Stretch Distributed Data Structureamitabh/pubs/SelfHealing...Model • Start: a network G. • An adversary inserts or deletes nodes . • After each node

PODC’ 09 Amitabh Trehan

Hafts in binary• Let i be an integer. There is a unique haft T

having i leaves.

• Let h be the number of ones in binary representation of i. T has h-i spine nodes and h complete binary trees.

0110

Page 39: The Forgiving Graph: A Low-Stretch Distributed Data Structureamitabh/pubs/SelfHealing...Model • Start: a network G. • An adversary inserts or deletes nodes . • After each node

PODC’ 09 Amitabh Trehan

Operations on hafts• Strip: return complete trees on deletion of

a node (and it’s virtual nodes).

fragmentsa

a c

c

gdd e

e

a b d e b gc

a

b

c

d

e

b

a c

c

gdd e

Complete trees

Page 40: The Forgiving Graph: A Low-Stretch Distributed Data Structureamitabh/pubs/SelfHealing...Model • Start: a network G. • An adversary inserts or deletes nodes . • After each node

PODC’ 09 Amitabh Trehan

Operations on hafts• Merge: Recombine hafts to make new haft.

Analogous to binary addition.

• Strip to get forest of complete trees.

• Join adjacent trees with a new node as root, larger tree as left child.

= 1000+0101 0010 + 0001

Page 41: The Forgiving Graph: A Low-Stretch Distributed Data Structureamitabh/pubs/SelfHealing...Model • Start: a network G. • An adversary inserts or deletes nodes . • After each node

FG in actionu

v w

y

z

x

t

Node v deleted ...

Page 42: The Forgiving Graph: A Low-Stretch Distributed Data Structureamitabh/pubs/SelfHealing...Model • Start: a network G. • An adversary inserts or deletes nodes . • After each node

u

w

y

z

x

t

w’u’

x’

x

replaced by RT(v)

Page 43: The Forgiving Graph: A Low-Stretch Distributed Data Structureamitabh/pubs/SelfHealing...Model • Start: a network G. • An adversary inserts or deletes nodes . • After each node

u

w

y

z

x

t

w’u’

x’

x

Node y deleted...

Page 44: The Forgiving Graph: A Low-Stretch Distributed Data Structureamitabh/pubs/SelfHealing...Model • Start: a network G. • An adversary inserts or deletes nodes . • After each node

u

w

z

x

t

w’u’

x’

x

replaced by RT(y)

x’ z’

Page 45: The Forgiving Graph: A Low-Stretch Distributed Data Structureamitabh/pubs/SelfHealing...Model • Start: a network G. • An adversary inserts or deletes nodes . • After each node

u

w

z

x

t

w’u’

x’

x

Node w deleted...

x’ z’

Page 46: The Forgiving Graph: A Low-Stretch Distributed Data Structureamitabh/pubs/SelfHealing...Model • Start: a network G. • An adversary inserts or deletes nodes . • After each node

u

z

tu’

x’

x

RT(v), RT(w) and u merge.

u’

x’z’

Page 47: The Forgiving Graph: A Low-Stretch Distributed Data Structureamitabh/pubs/SelfHealing...Model • Start: a network G. • An adversary inserts or deletes nodes . • After each node

a b c a

a c

b

a b c d

A virtual tree (left) and its homomorphic image (right)

Homomorphism: Given

The Forgiving Graph: A distributed data structure for low stretchunder adverserial attack

Tom Hayes! Jared Saia † Amitabh Trehan †

AbstractWe consider the problem of self-healing in peer-to-peer networks that are under repeated attack

by an omniscient adversary. We assume that, over a sequence of rounds, an adversary either inserts anode with arbitrary connections or deletes an arbitrary node from the network. The network respondsto each such change by quick ”repairs,” which consist of adding or deleting a small number of edges.

These repairs essentially preserve closeness of nodes after adversarial deletions, without increasingnode degrees by too much, in the following sense. At any point in the algorithm, nodes v and w whosedistance would have been ! in the graph formed by considering only the adversarial insertions (notthe adversarial deletions or the algorithm’s repairs), will be at distance O(! log n) in the actual graph,where n is the total number of vertices seen so far. Similarly, at any point, a node v whose degreewould have been d in the graph with adversarial insertions only, will have degree O(d) in the actualgraph. Our algorithm is completely distributed and has low latency and bandwidth requirements.

1 Introduction

G1 = (V1, E1), G2 = V2, E2

{v, w} ! E1 " {f(v), f(w)} ! E2

Our Model: We now describe our model of attack and network response. We assume that the networkis initially a connected graph over n nodes. An adversary repeatedly attacks the network. This adversaryknows the network topology and our algorithms, and it has the ability to delete arbitrary nodes from thenetwork or insert a new node in the system which will connect to at least one of the existing nodes in thenetwork. However, we assume the adversary is constrained in that in any time step it can only delete orinsert a single node.

Our Results:In this paper, we describe a new, light-weight distributed data structure that ensures that: 1) the

distance between any two nodes of the network never increases by more than log n times their originaldistance, where n are the number of nodes in the graph consisting solely of the original nodes andinsertions without regard to deletions and healings (we call this graph G"); and 2) the degree of any nodenever increases by more than 3 times over over its degree in G".

The formal statement and proof of these results is in Section 4.1.

2 Delete/Insert and Repair Model

We now describe the details of our delete/insert and repair model. Let G = G0 be an arbitrary graphon n nodes, which represent processors in a distributed network. The adversary either deletes nodes

!Toyota Technological Institute, Chicago, IL 60637; email: [email protected]†Department of Computer Science, University of New Mexico, Albuquerque, NM 87131-1386; email: {saia,

amitabh}@cs.unm.edu. This research was partially supported by NSF CAREER Award 0644058, NSF CCR-0313160, andan AFOSR MURI grant.

The Forgiving Graph: A distributed data structure for low stretchunder adverserial attack

Tom Hayes! Jared Saia † Amitabh Trehan †

AbstractWe consider the problem of self-healing in peer-to-peer networks that are under repeated attack

by an omniscient adversary. We assume that, over a sequence of rounds, an adversary either inserts anode with arbitrary connections or deletes an arbitrary node from the network. The network respondsto each such change by quick ”repairs,” which consist of adding or deleting a small number of edges.

These repairs essentially preserve closeness of nodes after adversarial deletions, without increasingnode degrees by too much, in the following sense. At any point in the algorithm, nodes v and w whosedistance would have been ! in the graph formed by considering only the adversarial insertions (notthe adversarial deletions or the algorithm’s repairs), will be at distance O(! log n) in the actual graph,where n is the total number of vertices seen so far. Similarly, at any point, a node v whose degreewould have been d in the graph with adversarial insertions only, will have degree O(d) in the actualgraph. Our algorithm is completely distributed and has low latency and bandwidth requirements.

1 Introduction

G1 = (V1, E1), G2 = V2, E2

{v, w} ! E1 " {f(v), f(w)} ! E2

Our Model: We now describe our model of attack and network response. We assume that the networkis initially a connected graph over n nodes. An adversary repeatedly attacks the network. This adversaryknows the network topology and our algorithms, and it has the ability to delete arbitrary nodes from thenetwork or insert a new node in the system which will connect to at least one of the existing nodes in thenetwork. However, we assume the adversary is constrained in that in any time step it can only delete orinsert a single node.

Our Results:In this paper, we describe a new, light-weight distributed data structure that ensures that: 1) the

distance between any two nodes of the network never increases by more than log n times their originaldistance, where n are the number of nodes in the graph consisting solely of the original nodes andinsertions without regard to deletions and healings (we call this graph G"); and 2) the degree of any nodenever increases by more than 3 times over over its degree in G".

The formal statement and proof of these results is in Section 4.1.

2 Delete/Insert and Repair Model

We now describe the details of our delete/insert and repair model. Let G = G0 be an arbitrary graphon n nodes, which represent processors in a distributed network. The adversary either deletes nodes

!Toyota Technological Institute, Chicago, IL 60637; email: [email protected]†Department of Computer Science, University of New Mexico, Albuquerque, NM 87131-1386; email: {saia,

amitabh}@cs.unm.edu. This research was partially supported by NSF CAREER Award 0644058, NSF CCR-0313160, andan AFOSR MURI grant.

a map such that

a

d

Page 48: The Forgiving Graph: A Low-Stretch Distributed Data Structureamitabh/pubs/SelfHealing...Model • Start: a network G. • An adversary inserts or deletes nodes . • After each node

PODC’ 09 Amitabh Trehan

Technical issues• Implementing Merge: Binary Tree (BT) of

post deletion fragments and anchor nodes

• Finding primary roots: probe messages through anchors

• Am I a primary root? maintain and use height, number of descendant information

• Merging hafts: representative mechanism

Page 49: The Forgiving Graph: A Low-Stretch Distributed Data Structureamitabh/pubs/SelfHealing...Model • Start: a network G. • An adversary inserts or deletes nodes . • After each node

PODC’ 09 Amitabh Trehan

Summary

• Forgiving graph ensures degree increase is a multiplicative constant. Stretch is at most log n.

• These parameters are essentially optimal.

• Forgiving graph is fully distributed, has O(log d log n) latency and O(d log n) messages exchanged per round, for deletion of node of degree d.

Page 50: The Forgiving Graph: A Low-Stretch Distributed Data Structureamitabh/pubs/SelfHealing...Model • Start: a network G. • An adversary inserts or deletes nodes . • After each node

PODC’ 09 Amitabh Trehan

Future Directions• Extend model and algorithms to apply to

sensor networks.

• Functional self-healing: Can we perform robust computation in face of component failures e.g. in circuits.

• Find connections between our work and self-healing in biological and social networks.

Page 51: The Forgiving Graph: A Low-Stretch Distributed Data Structureamitabh/pubs/SelfHealing...Model • Start: a network G. • An adversary inserts or deletes nodes . • After each node

PODC’ 09 Amitabh Trehan

Thank You