Skip to main content

Glossary

Peer-to-peer

Also called: P2P

Peer-to-peer (P2P) is a network design in which devices, called peers, exchange data directly with each other instead of each talking only to a central server. Each peer can act as both client and server.

Reviewed

Peer-to-peer vs client–server

Client–server compared with peer-to-peer
Who carries the data
Client–server:A central server, every time
Peer-to-peer:The peers themselves
Scaling
Client–server:The operator adds servers as users grow
Peer-to-peer:Each new peer also contributes capacity
Single point of failure
Client–server:Yes — the server
Peer-to-peer:Fewer, though most systems still rely on some servers
Finding each other
Client–server:Trivial: everyone knows the server
Peer-to-peer:Needs discovery or signaling

Pure P2P is rare. File-sharing networks such as BitTorrent use trackers or distributed hash tables so peers can find each other, and a WebRTC call needs a signaling server to introduce the two devices before any audio flows directly.

Why direct connections often fail

Most devices sit behind NAT (network address translation): your phone has a private address, and the router or mobile carrier shares one public address among many devices. An outsider can't simply connect in. Real-time apps work around this with ICE, which gathers possible routes (candidates) and tests them in pairs. A STUN server tells a device its public address so the peers can attempt “hole punching” through their NATs. When that fails — symmetric NAT, carrier-grade NAT, or firewalls that block UDP — a TURN server relays the traffic instead.

A relayed call is no longer peer-to-peer at the network level, even though the session is still between the same two devices. That trade is why calls connect reliably at all; the guide to video calls on bad networks covers what you can do on your side.

What P2P doesn't mean

On Asyncbit

Asyncbit's voice and video calls run on WebRTC, connecting devices directly where the network allows and relaying through a TURN server when it doesn't — which is what lets calls connect on mobile data and restrictive networks. Everything else goes through Asyncbit's servers: chat messages are stored encrypted at rest, not end-to-end encrypted. The marketplace is peer-to-peer in the everyday sense: buyer and seller arrange things between themselves, and Asyncbit handles no payments and takes no fees.

See it for yourself

Asyncbit is free, with no paid tier and no ads. Everything described here is available from the first day.

Create your free account