Title: Lecture 2: Overlay Networks for Wired Systems
1Lecture 2Overlay Networks for Wired Systems
- Christian Scheideler
- Institut für Informatik
- Technische Universität München
2Overlay Network
- Every distributed system needs a connect-ed
knowledge graph among its sites. - Such a graph overlay network
3Open Distributed Systems
- In open distributed systems, the set of sites may
frequently change over time. - Problem how to maintain overlay network in a
scalable and robust way??
4Distributed Systems
server-based
supervised
peer-to-peer
structured overlay networks
5Structured Overlay Networks
- Many structured overlay networks based on concept
of virtual space - Elegant approach Naor Wieder 03
6Continuous-discrete Approach
- V set of peers, U virtual space
- Each v 2 V mapped to region R(v) ½ U
- Family F of functions fU ! U
- v,w edge , F(R(v)) Ã… R(w) F(R(w)) Ã… R(v)
7Continuous-discrete Approach
- Basic questions
- How to map peers to regions?
- What family F to choose?
8Continuous-discrete Approach
- Take a classical family of networks(Hypercube,
de Bruijn graph,) - Convert it into continuous form by interpreting
node labels as points in U,edges as a family of
functions F - Mapping peers to regions will then convert
continuous form back into discrete graph.
9Hypercube
- Classical hypercube
- V nodes with labels (x1,,xd) 2 0,1d
- For all i (x1,,xd) ! (x1,..,1-xi,..,xd)
- Continuous version of hypercube
- Interpret (x1,,xd) as z?i xi/2i
- d ! 1 U0,1)
- F fi(x) x1/2i, fi-(x) x-1/2i 8 igt0
10De Bruijn Graph
- Classical de Bruijn graph
- V nodes with labels (x1,,xd) 2 0,1d
- E (x1,,xd) ! (0,x1,,xd-1), (1,x1,,xd-1)
- Continuous de Bruijn graph
- Interpret (x1,,xd) as z?i xi/2i
- d ! 1 U0,1)
- F f0(x) x/2, f1(x) (1x)/2
11Gabber-Galil Graph
- Classical Gabber-Galil graph
- Node set (x,y) 2 0,,n-12
- (x,y) ! (x,xy),(x,xy1), (xy,y),
(xy1,y) - Continuous Gabber-Galil graph
- N ! 1 U0,1)2
- F f1(x,y)(x,xy), f2(x,y)(xy,y)
12How to map peers to regions?
- Supervised networksfocus on U0,1)d, d
fixeduse recursive labeling hierarchical
decomposition - Pure peer-to-peer systemsfocus on U0,1)use
consistent hashing
13Supervised Overlay Networks
- Supervisor handles all join/leave requests.
- All other operations handled by peers.
- Central requirements
- Supervisor stores only polylog information about
system. - Join and leave operations with constant work and
time.
14Supervised Overlay Networks
- General approach
- Place peers into points of 0,1)-ring
- Connect neighboring peers to cycle
15Recursive Labeling
- Assign labels to peers in following order0 1 01
11 001 011 101 111 0001 0011 - Interpret them as binary encodings of real
numbers in 0,1) xv ?i bi/2i
16Recursive Labeling
- Node wants to join (n nodes in system)give it
nth label in list - Node v wants to leavemove node with nth label
to vs position
17Maintaining a Cycle
- v node with nth label
- supervisor stores pred(v), v, succ(v),
succ(succ(v)) - join and graceful leave operation
18Hierarchical decomposition
- How to use continuous-discrete approach?
- Consider any space U0,1)d
- Hierarchical decomposi-tion tree
19Hierarchical Decomposition
0
1
0
001
01
10
11
20Hierarchical Decomposition
- Fact
- Volumes of subcubes assigned to nodes differ by
factor of at most 2. - Subcubes pairwise disjoint.
- Union of subcubes gives U.
- Combine this with family F of functions.
21Join Operation
0
1
0
001
01
10
11
22Leave Operation
0
1
0
001
01
10
11
23Conclusion
- For any supervised network based on
continuous-discrete approach - Supervisor only has to store constant information
about network. - Join/leave can be performed with constant time
and work for supervisor.
24Pure Peer-to-Peer Network
- We focus on U0,1).
- Every peer mapped to random point in 0,1).
- Peer v owns region v,succ(v)).
- Chord cryptographic hash function
- CAN random number
0
1
25Join Operation
- New node chooses random position x.
- Route to node owning position.
0
1
x
26Leave Operation
- Node that wants to leave transfers its
connections to its predecessor.
0
1
27Scalability and Robustness
- Scalability
- Network has (poly-)logarithmic diameter
- Peers have (poly-)logarithmic degree
- Robustness
- Network can handle large fraction of adversarial
peers (i.e. honest peers form single connected
component)! join-leave attacks
28Join-Leave Model
- n honest peers
- ?n adversarial peers, ?lt1
- Operations
- Join(v) peer v joins the system
- Leave(v) peer v leaves the system
- Goal maintain scalability and robustness for
any sequence of polynomially many adversarial
rejoin (leavejoin) requests
29More specific goal
- n honest peers, ?n adversarial peers
- U0,1), region selection via Karger et al.(
R(v) xv, succ(xv)) ) - For any interval I ½ 0,1) of size (c log n)/n
- Balancing condition ?(log n) peers in I
- Majority condition honest peers in majority
30How to satisfy conditions?
- Chord uses cryptographic hash function to map
peers to points in 0,1) - randomly distributes honest peers
- does not randomly distribute adversarial peers
31How to satisfy conditions?
- CAN map peers to random points in 0,1)
32How to satisfy conditions?
- Group spreading AS04
- Map peers to random points in 0,1)
- Limit lifetime of peers
Too expensive!
33How to satisfy conditions?
- Rule that works k-cuckoo rule
n honest ?n adversarial
evict k/n-region
? lt 1-1/k
Rejoin leave and join via k-cuckoo rule
34Analysis of k-cuckoo rule
- k-region region of size k/n starting at integer
multiple of k/n - R fixed set of c log n consec. k-regions
- New node not yet replaced after joining
- ?gt0 small constant
- Lemma R has at most c log n new nodes.
- Lemma Sum of ages of k-regions in R in (1 ?)
(c log n)n/k, w.h.p.
35Analyis of k-cuckoo rule
- R fixed set of c log n consecutive k-regions
- T(?/?)log3 n
- ?gt0 small constant
- Lemma In any time interval of size T, (1?)kT
honest nodes and (1?)?kT adv. nodes evicted,
w.h.p. - Lemma R has (1 ?)(c log n)k old honest and
lt(1?)(c log n)?k old adv. nodes, w.h.p.
36Analysis of k-cuckoo rule
- honest nodes in R gt(1-?)(c log n)k
- adversarial nodes in Rlt(1?)(c log n)?k (c
log n) - Theorem When using the k-cuckoo rule with
?lt1-1/k, the balancing and majority conditions
are satisfied for poly many adversarial rejoin
requests, w.h.p.
37Limitation of k-cuckoo rule
- Only works for any sequence of rejoin requests of
adversarial peers. - Does not work for any sequence of rejoin
requests. - Example adversary orders all peers in a region
of size O(log n / n) to leave
38Questions?