๐ŸŽ“ BookMCQ
โ† Back to 29. Peer to Peer Paradigm

๐Ÿ“ Pastry protocol in peer to peer networks (8 MCQs)

๐Ÿ“– From Data Communication and Networks โ€ข 29. Peer to Peer Paradigm โ€ข 8 questions available

What is Pastry protocol in peer to peer networks?

Pastry is a structured P2P protocol that routes messages through a decentralized overlay network using prefix-based routing, ensuring that any message reaches its destination in O(log N) steps while self-organizing as nodes join or leave.

2
Easy
4
Medium
2
Hard

๐Ÿ“ All Pastry protocol in peer to peer networks MCQs

Q1. What does the leaf set in Pastry contain?

A.Nodes with numerically closest node IDs โœ…
B.All nodes in the same network segment
C.Routing table entries
D.Backup replicas
๐Ÿ’ก Difficulty: easy | โœ… Correct: A

๐Ÿ“– Explanation: The leaf set stores the set of nodes whose identifiers are numerically closest to the local node, typically the ll smallest and largest IDs. This allows Pastry to quickly forward messages to nearby IDs and to handle failures without consulting the full routing table.

Q2. If a node receives a message whose destination ID differs from its own ID in the first digit, which Pastry component is used to forward the message?

A.Leaf set
B.Routing table โœ…
C.Neighborhood set
D.Bootstrap server
๐Ÿ’ก Difficulty: easy | โœ… Correct: B

๐Ÿ“– Explanation: Pastry routes messages by matching the longest prefix between the current node's ID and the destination ID. When the first digit differs, the routing table entry that corresponds to that digit is consulted, because the leaf set only handles IDs that share the prefix. Therefore the routing table directs the message toward the appropriate next hop.

Q3. Which statement best differentiates Pastryโ€™s routing mechanism from Chordโ€™s finger table approach?

A.Both use prefix matching
B.Pastry routes based on geographic proximity
C.Pastry uses a prefixโ€‘based routing table while Chord uses logarithmically spaced finger entries โœ…
D.Pastry does not maintain any neighbor information
๐Ÿ’ก Difficulty: medium | โœ… Correct: C

๐Ÿ“– Explanation: Pastry builds a routing table where each row corresponds to a shared prefix length and each column to a possible digit, enabling deterministic prefix matching. In contrast, Chordโ€™s finger table contains entries that point to nodes at distances of 2k2^k around the identifier circle, providing logarithmic hop guarantees but without explicit prefix awareness. Hence option C captures the core structural difference.

Q4. Given a node X with identifier 0x3A70x3A7 and a destination identifier 0x3B90x3B9, what is the minimum number of routing hops Pastry can guarantee to reach the destination?

A.1 hop
B.2 hops โœ…
C.3 hops
D.4 hops
๐Ÿ’ก Difficulty: medium | โœ… Correct: B

๐Ÿ“– Explanation: The two identifiers share the first hexadecimal digit โ€˜3โ€™, so the longest common prefix length is one digit. Pastryโ€™s routing table can forward the message to a node whose prefix matches the destination in the next digit, changing โ€˜Aโ€™ to โ€˜Bโ€™. After that step, the prefix length becomes two digits, and a second hop can resolve the final digit. Therefore the protocol guarantees at most two hops.

Q5. If the leaf set size ll is increased, which of the following effects is most likely on Pastryโ€™s routing performance?

A.Higher routing latency due to larger tables
B.Decrease in network bandwidth consumption
C.Elimination of the need for a routing table
D.Reduced chance of routing failures โœ…
๐Ÿ’ก Difficulty: medium | โœ… Correct: D

๐Ÿ“– Explanation: A larger leaf set provides more immediate neighbours whose IDs are close to the local node, thereby offering alternative nextโ€‘hops when the preferred routing table entry fails. This redundancy lowers the probability that a message cannot be forwarded because all candidates are unavailable, improving reliability. However, the size of the routing table itself does not change, so latency and bandwidth are largely unaffected.

Q6. Which tradeโ€‘off best describes increasing the routing table width (i.e., number of columns per row) in Pastry?

A.Fewer hops but higher memory consumption
B.More hops but less memory usage โœ…
C.Improved fault tolerance without affecting hop count
D.Reduced join latency at the cost of higher routing complexity
๐Ÿ’ก Difficulty: medium | โœ… Correct: B

๐Ÿ“– Explanation: Expanding the number of columns per routingโ€‘table row means each node stores entries for more possible digit values, effectively increasing the branching factor. This reduces the expected number of hops because the message can often jump closer to the destination in a single step. The downside is that each node must maintain more pointers, raising memory requirements and maintenance traffic. Hence option B captures the primary tradeโ€‘off.

Q7. A Pastry network experiences a temporary partition that isolates a subset of nodes. After the partition heals, which mechanism ensures that routing tables and leaf sets converge to a consistent state?

A.Periodic stabilization messages that exchange neighbor information โœ…
B.Reโ€‘execution of the bootstrap algorithm for all nodes
C.Immediate flooding of the entire network
D.Static tables that never change
๐Ÿ’ก Difficulty: hard | โœ… Correct: A

๐Ÿ“– Explanation: Pastry nodes periodically run a stabilization routine that contacts neighbors to verify and update their routing tables and leaf sets. When partitions heal, nodes exchange their current views, reconciling differences and incorporating any newly reachable identifiers. This incremental approach allows the network to converge without global flooding or restarting the bootstrap process, preserving scalability while restoring consistency. Therefore option A correctly describes the convergence mechanism.

Q8. When a new node Y with identifier 0x4F20x4F2 joins a Pastry network, what is the immediate effect on the routing tables of existing nodes whose prefix matches the first two digits of Y?

A.They replace their entry for that prefix with Y โœ…
B.They add Y as an additional candidate for that prefix
C.They ignore Y until the next stabilization round
D.They delete the entire row corresponding to that prefix
๐Ÿ’ก Difficulty: hard | โœ… Correct: A

๐Ÿ“– Explanation: During the join process, Y sends a join message toward its destination prefix. Each node that receives this message compares Yโ€™s identifier with the current entry for the matching prefix. If Y is numerically closer, the node replaces the existing entry with Y, ensuring the routing table always points to the nearest node for that prefix. This update happens instantly as the join message propagates.

๐Ÿ”— Related Topics (MCQs)