Peer-to-peer network

Last updated

A peer-to-peer network is one in which devices connect directly to each other and act as both client and server, rather than routing everything through a central server. Each peer can request and provide resources, so the network has no single hub that every participant depends on. In a wireless peer-to-peer network, peers link over local radios and can relay traffic on behalf of others.

How it works

In the client-server model, many clients talk to one server, and the server mediates everything. In a peer-to-peer (P2P) model, every node is a peer of equal standing. A peer that needs data asks another peer for it directly, and a peer that has data serves it directly.

Because responsibility is spread across peers, the network can keep functioning when any single node leaves. Peers discover each other, form connections based on availability and quality, and in a wireless mesh they also forward traffic so that peers out of direct range can still reach each other through intermediate hops.

The trade-off is coordination. Without a central authority, peers need their own mechanisms for discovery, trust, and consistency, which is why robust P2P systems pair direct connectivity with cryptographic identity and explicit delivery guarantees.

Why it matters

Peer-to-peer networks remove the central point of failure and the central point of control. They keep working when infrastructure is unavailable, and they scale with participation, since every new peer can add both demand and capacity.

For offline and field use, that resilience is the point: peers can coordinate directly when no server is reachable at all.

How it relates to Offline Protocol

Offline Protocol is peer-to-peer at its core. Its transport layer, DORS, connects phones directly over BLE and WiFi Direct with no server in the message path, and each device relays for others up to 8 hops. Peers authenticate one another with Ed25519 OfflineID credentials, and sessions are encrypted with MLS (RFC 9420) so relaying peers forward ciphertext only.

See peer-to-peer mesh networking for how peers choose routes and confirm delivery, and Service Discovery for how peers advertise and invoke capabilities across the network.

Frequently asked questions

What is the difference between peer-to-peer and client-server?

In client-server, many clients depend on one central server that mediates all requests. In peer-to-peer, each device is both client and server and connects directly to other peers, so there is no central hub that everyone relies on.

Is a mesh network a peer-to-peer network?

A wireless mesh is a form of peer-to-peer network in which peers not only connect directly but also relay traffic for each other, extending reach beyond direct radio range through multi-hop routing.

How do peers trust each other without a server?

Through cryptographic identity. In Offline Protocol, each peer holds an Ed25519 keypair and verification is a local signature check, with trust-on-first-use pinning on first contact, so no certificate authority or server is needed.

Connect devices peer to peer, offline. 350,000+ devices, 80+ countries.

Book a pilot Read the docs