๐ Pastry protocol in peer to peer networks (8 MCQs)
Prefix-Based Routing in a Structured Overlay
Pastry is a structured peer-to-peer routing and object-location protocol. Each participating node has a unique node identifier, and application messages carry a key identifying their destination. Pastry forwards a message toward the live node whose identifier is numerically closest to that key, using shared identifier prefixes to make routing progress. Prefix matches direct logical progress; physical proximity remains a separate consideration.
Routing Table, Leaf Set, and Neighborhood Set
A Pastry node maintains three kinds of state. Its routing table contains peers with progressively longer shared prefixes; its leaf set contains numerically close node IDs on either side; and its neighborhood set records peers close under a network-proximity metric. These structures support routing and locality. Sets organize routing state by prefix, proximity, and identifier order.
Forwarding by Longer Prefix Matches
At each step, Pastry normally forwards to a node sharing a longer prefix with the destination key. If that entry is unavailable, it selects a known node whose prefix match is at least as good and whose identifier is numerically closer. The process continues until the closest known destination is reached. Every hop must improve the prefix or satisfy the fallback rule.
Routing a Key Through Prefix Digits
Suppose a node identifier begins 3A2 and the destination key begins 3AF. A routing-table entry with prefix 3AF can advance the message beyond the current 3A match. If no such peer is known, the node uses a suitable leaf-set or other state entry that makes numerical progress. The selected peer advances the key's shared prefix match at this stage.
Locality-Aware Services and Membership Changes
Pastry can support distributed storage, content location, group communication, and naming services. The neighborhood set helps choose nearby peers, while the leaf set supports final delivery near the target identifier. Nodes update routing state as peers join, fail, or recover, allowing the overlay to adapt. The application remains responsible for stored data and service permissions.
Pastry Does Not Route by IP Prefix
'Pastry matches IP address prefixes' is false because it compares overlay node identifiers. 'The leaf set stores the physically nearest routers' confuses identifier order with network proximity. 'Every hop must add one digit' is too absolute because fallback routing may be needed when the ideal table entry is absent. Identifier order and network proximity remain separate routing criteria in Pastry.
Prefix Progress and Pastry State Questions
Examinations may ask students to compare identifier prefixes, select a routing-table entry, or explain the fallback rule. Distinguish the routing table's prefix organization from the leaf set's numerical neighbors and the neighborhood set's network proximity. Trace the message until no known node is closer to the key. Name the routing table row, fallback candidate, and leaf set decision clearly.
Pastry Routing State and Prefix Terms
- Node ID - Unique identifier of a Pastry peer..
- Prefix match - Number of matching leading digits..
- Routing table - Peers indexed by shared prefix length..
- Leaf set - Numerically closest larger and smaller IDs..
- Neighborhood set - Peers selected by network proximity..
- Fallback route - Alternative hop when ideal entry is absent..
๐ All Pastry protocol in peer to peer networks MCQs
Q1. What does the leaf set in Pastry contain?
๐ Explanation: The leaf set stores the set of nodes whose identifiers are numerically closest to the local node, typically the 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?
๐ 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?
๐ 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 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 and a destination identifier , what is the minimum number of routing hops Pastry can guarantee to reach the destination?
๐ 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 is increased, which of the following effects is most likely on Pastryโs routing performance?
๐ 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?
๐ 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?
๐ 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 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?
๐ 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.