📝 Chord protocol in peer to peer networks (9 MCQs)
Circular Lookup Through Consistent Hashing
Chord is a structured peer-to-peer lookup protocol that maps a key to a responsible node in a circular identifier space. A consistent hash function assigns identifiers to both peers and data keys. The successor of a key is the first node encountered clockwise at or after that key, allowing applications to locate resources without a central index. The ring defines key ownership independently of physical network topology or geographic distance.
Successors, Predecessors, and Finger Entries
Each node maintains its immediate successor and predecessor, together with a finger table containing shortcuts to selected points around the identifier circle. Successor links preserve the basic ordering needed for correct lookup, while finger entries accelerate navigation. The identifier space has size 2^m for m-bit identifiers. These entries describe logical destinations, not physical network routes between peers.
Routing a Find-Successor Request
A lookup begins at any known Chord node. If the requested key lies between that node and its successor, the successor is responsible; otherwise, the node forwards the query to its closest preceding finger. Repeating this step moves the request toward the key without requiring every node to know all peers. Each hop narrows the clockwise search while preserving ring order.
Mapping a File Hash to a Responsible Peer
With an 8-bit illustrative identifier space, suppose live node IDs are 20, 75, 130, and 210, and a file hashes to key 90. Moving clockwise, the first node at or after 90 is 130, so node 130 is responsible under the successor rule. Ring position, rather than physical distance, determines this assignment in the overlay.
Joining, Stabilization, and Distributed Applications
Chord supports lookup services used by distributed indexes, storage systems, and resource-location applications. When a peer joins or leaves, successor and predecessor information must be repaired; stabilization and finger maintenance help nodes adapt. The protocol locates a responsible node, while applications define the actual data format and storage behavior. Applications must handle replicas, stale records, and content transfer separately.
Chord Is Not a File-Transfer Protocol
'Chord sends the file contents itself' is incorrect because it resolves keys to nodes. 'The finger table replaces successors' is wrong because successor links support correct ring structure. 'A key always maps to the numerically closest node' is misleading: Chord assigns it to the first clockwise successor, including wraparound. Finger shortcuts accelerate lookup but do not replace ring correctness.
Ring Lookup and Maintenance Tracing
Students should trace clockwise intervals, identify the successor of a key, and calculate finger starts using n plus powers of two modulo 2^m. They should also distinguish lookup forwarding from stabilization, and explain why a maintained successor relation is fundamental even when finger shortcuts are stale. Show interval endpoints and wraparound when justifying each successor choice.
Chord Ring and Lookup Terminology
- Identifier circle - Circular ordering of node and key identifiers..
- Successor - First clockwise node after an identifier..
- Predecessor - Immediate previous node on the ring..
- Finger table - Routing shortcuts to successor nodes..
- Stabilization - Refreshes neighboring ring relationships..
- Consistent hashing - Maps keys and nodes to identifiers..
📝 All Chord protocol in peer to peer networks MCQs
Q1. A new node with identifier 18 joins a Chord ring where node 14’s successor is node 20. Which statement correctly describes the immediate effect on node 14’s routing information?
📖 Explanation: When node 18 inserts itself between 14 and 20, the ring ordering forces node 14 to update its successor pointer to the newly adjacent node 18. The predecessor of 14 remains unchanged, and finger table entries are only adjusted during the stabilization phase, not instantly.
Q2. In a Chord network with identifier space modulo , a lookup for key 27 starts at node 5. Which sequence of nodes is most likely visited before reaching the key’s successor?
📖 Explanation: The identifier space is –. Node 5’s finger table contains entries that jump to the closest preceding nodes. The most efficient path follows the power‑of‑two steps: from 5 to 8, then 16, then 24, and finally reaches the node responsible for key 27. This matches option D.
Q3. If nodes 2, 7, and 15 are present in a Chord ring of size , and node 7 fails unexpectedly, what is the most immediate inconsistency that can arise in node 2’s finger table?
📖 Explanation: Node 2’s finger table entry for start 4 should point to the first node that succeeds identifier 4, which was node 7. After node 7 crashes, that entry still contains the stale identifier of the failed node, causing an immediate inconsistency until stabilization repairs it.
Q4. Which of the following best contrasts the finger table with the successor list in Chord?
📖 Explanation: The finger table contains entries that give logarithmic‑size shortcuts, enabling fast lookups, while the successor list holds a small set of immediate successors to tolerate failures. This distinction directly matches option A.
Q5. In a Chord system with identifier length bits, how does increasing from 8 to 12 affect the average lookup path length, assuming the number of nodes remains constant?
📖 Explanation: Lookup cost in Chord depends primarily on the number of active nodes , not on the size of the identifier space. Expanding merely enlarges the potential key space, leaving the average number of hops—approximately —unchanged, which is captured by option B.
Q6. Consider two maintenance strategies: (1) Chord’s periodic stabilization where each node contacts its successor; (2) a naive approach where nodes broadcast their full finger tables after every join. Which statement correctly captures a key difference?
📖 Explanation: Chord’s stabilization is designed to be lightweight: each node periodically sends a small number of messages (constant‑time) to its successor, leading to overall traffic. Broadcasting full finger tables after every join would generate a message count that grows linearly with the number of nodes, i.e., , making option A the accurate comparison.
Q7. Given a Chord ring with 1024 nodes (), what is the expected number of hops for a lookup if finger tables are perfectly populated?
📖 Explanation: When finger tables are complete, the expected lookup length is about . For , , so the average number of hops is roughly 5, matching option D.
Q8. If three consecutive nodes in a Chord ring fail simultaneously, how does the network ensure continued correct routing for lookups?
📖 Explanation: Chord nodes maintain a successor list of several immediate successors. When a block of consecutive nodes disappears, each surviving node can still reach a live node via its successor list, effectively bypassing the gap and preserving routing correctness, which is described in option A.
Q9. In Chord, what is the primary purpose of a finger table?
📖 Explanation: A finger table contains entries that point to nodes at exponentially increasing distances around the identifier circle. This structure gives each node a logarithmic‑size set of shortcuts, enabling lookups to be performed in hops, which is the purpose stated in option B.