Network Topology
KayakNet uses a decentralized peer-to-peer topology with no central servers.
Network Structure
┌──────────┐
│Bootstrap │
│ Node │
└────┬─────┘
│
┌───────────────┼───────────────┐
│ │ │
┌────▼────┐ ┌────▼────┐ ┌────▼────┐
│ Node A │◄───►│ Node B │◄───►│ Node C │
└────┬────┘ └────┬────┘ └────┬────┘
│ │ │
│ ┌──────────┘ │
│ │ │
┌────▼────▼──┐ ┌────────▼───┐
│ Node D │◄────────────►│ Node E │
└────────────┘ └────────────┘Node Types
Bootstrap Nodes
Well-known entry points
Help new nodes join
Provide initial peer lists
Always available
Regular Nodes
Run by users
Equal participants
Route traffic for others
Come and go freely
Relay Nodes (Optional)
High-bandwidth volunteers
Prioritized for routing
No special privileges
Peer Discovery
Initial Connection
New node contacts bootstrap
Solves Proof-of-Work challenge
Receives initial peer list
Connects to peers
DHT-Based Discovery
Once connected:
Node joins Kademlia DHT
Announces its presence
Discovers peers via DHT queries
Maintains routing table
Peer Selection
Criteria for selecting peers:
Diversity - Different subnets/geographies
Reliability - Low latency, high uptime
Capacity - Bandwidth availability
Reputation - Peer score
Connection Management
Maintaining Connections
Connection Limits
Min Peers
5
Minimum connections
Max Peers
50
Maximum connections
Bootstrap Peers
3
Reserved for bootstrap
Peer Scoring
Peers are scored based on:
Latency - Lower is better
Uptime - Longer is better
Behavior - No spam, valid messages
Throughput - Bandwidth provided
Network Resilience
Node Failures
When a peer disconnects:
Mark as offline
Try reconnection (3 attempts)
Remove from active list
Keep in cache for later
Find replacement peer
Partition Healing
If network splits:
Both partitions continue independently
Bootstrap nodes bridge partitions
DHT eventually merges
Data reconciles
Attack Resistance
Sybil
PoW, peer scoring
Eclipse
Diverse selection
DDoS
Rate limiting
Partition
Bootstrap bridges
Data Propagation
Message Routing
Messages propagate via:
Direct - To connected peers
Gossip - Random peer selection
DHT - Store and forward
PubSub - Topic subscription
Latency
Typical message latency:
Direct peer: 50-100ms
2-hop: 100-200ms
3-hop (onion): 150-300ms
DHT lookup: 200-500ms
Geographic Distribution
Nodes are globally distributed:
No geographic restrictions
Automatic peer diversity
Regional clustering avoided
Bootstrap Infrastructure
Current Bootstrap Nodes
203.161.33.237:4242
Primary
Active
Running Your Own Bootstrap
Contact us to be added to default list.
Monitoring
Network Health
Check your node's connectivity:
Key metrics:
Peer count (should be 5-50)
Latency (should be <500ms)
Message throughput
Debug Logging
Last updated

