Portfolio/Overlay Networks
Chord-based P2P Network

Overlay Networks

Chord-based overlay network implementation with TCP and Protobuf. Provides distributed hash table functionality for peer-to-peer systems with efficient routing and lookup. Includes node joining, leaving, and failure handling mechanisms.

Language

Go

Protocol

TCP + Protobuf

Pattern

Chord DHT

Overlay Networks screenshot

Tech Stack

Technologies Used

GoGo
DockerDocker
LinuxLinux
GitGit
GitHubGitHub
BashBash
GoGo
DockerDocker
LinuxLinux
GitGit
GitHubGitHub
BashBash
GoGo
DockerDocker
LinuxLinux
GitGit
GitHubGitHub
BashBash
GoGo
DockerDocker
LinuxLinux
GitGit
GitHubGitHub
BashBash

Core Implementation

Key Features

Distributed Hash Table

Structured P2P ring with finger tables for efficient O(log N) routing and key lookup across the network.

Node Discovery

Registry-based and peer-to-peer discovery. Nodes register and deregister via persistent TCP connections.

Fault Tolerance

Auto-reconnect on failure with persistent TCP connections for peers in finger table ensuring network stability.

Visual Preview

Screenshots

Overlay Networks screenshot

Deep Dive

Project Case Study

Technical details and challenges

The Challenge

Distributed hash tables need efficient routing, fault tolerance, and scalability. Chord provides O(log N) lookup complexity but requires careful implementation. The challenge was building a complete Chord overlay network in Go with proper finger table management, node joining/leaving, data replication, and automatic recovery from node failures.

The Solution

Implemented full Chord protocol using Go with TCP connections for peer communication. Nodes maintain finger tables for efficient routing and successor lists for fault tolerance. The registry enables node discovery while peer-to-peer connections handle data operations. Implemented consistent hashing for data distribution and automatic stabilization to maintain network integrity during churn.

Technical Deep Dive

Go's goroutines handle concurrent operations and network communication. SHA-1 hashing provides consistent node and key placement in the ring. Finger tables enable O(log N) lookup performance. Persistent TCP connections maintain peer relationships. Stabilization protocol runs periodically to update finger tables and handle topology changes. The implementation demonstrates practical distributed systems concepts in a working peer-to-peer network.

Results & Impact

Successfully implemented a working Chord DHT with proper routing, fault tolerance, and scalability. The network handled node joins, leaves, and failures gracefully. Performance benchmarks confirmed O(log N) lookup complexity. The project demonstrated deep understanding of distributed systems algorithms and practical Go networking programming.