Skip to content
StackDecode
System Design
3. Client-Server ArchitectureAnimated

Peer-to-Peer Architecture

Nodes act as both clients and servers with no central server.

The idea

Peers share resources directly. The system scales with the number of participants.

Watch it work

Press play, pause, or step through. Some animations have settings you can change.

Peer APeer BPeer CPeer DPeer E
  • client
  • gateway / proxy
  • service
  • cache
  • data store
  • queue / stream

Every peer is both client and server.

step:
1/4
at:
Peer A
1/9

The green dot is a request moving through the system.

Step by step

  1. 1A peer joins the network
  2. 2It discovers other peers
  3. 3Peers exchange data directly
  4. 4Content is shared across many peers

Where it is used

File sharing, blockchain, some video calls.

Watch out for

Discovery, trust and consistency are harder without a centre.

Related