💻

Distributed & Parallel Computing

How do a thousand computers agree on anything? Watch leader elections, gossip spread information like a virus, and see why CAP means you can have at most two of three guarantees.

6 simulations Consensus · Gossip CAP · Fault Tolerance

Simulations

Open any simulation — runs instantly in your browser

📡
Popular★☆☆ Beginner
Gossip Protocol —Information Epidemic
Boids flocking algorithm recast as a gossip network: each agent infects neighbours with a "message" — watch eventual consistency emerge without central coordination.
GossipEventualAgents
🗳️
★★☆ Moderate
Consensus & Epidemic Spreading
SIR dynamics model information propagation vs. misinformation — analogous to the divergence phase before Raft achieves quorum. Vary network topology and latency.
SIRConsensusNetwork
🔄
★★☆ Moderate
Network Routing — Dijkstra on Topology
Shortest-path routing on a changing network graph: add/remove nodes and links, simulate link-state advertisements and watch routing tables reconvey — OSPF in a browser.
DijkstraOSPFGraph
💾
★★★ Advanced
Byzantine Generals — Fault Tolerance
Multi-agent game theory models the Byzantine fault problem: traitors send conflicting messages. Watch loyal generals converge (or not) as you vary the fraction of faulty nodes.
ByzantineBFTGame Theory
🏎️
★☆☆ Beginner
Parallel Sort — Race Conditions
Multiple sorting threads operate on shared data — introduce artificial delays and observe race conditions, cache invalidation storms and the cost of synchronisation primitives.
ParallelRaceMutex
🌩️
★★★ AdvancedNew
Distributed Neural Network Training
Data-parallel gradient accumulation across simulated worker nodes — see how parameter servers, stale gradients and bandwidth constraints affect convergence speed.
Data-ParallelGradientWorkers

Related Articles

Related Categories

About Distributed Systems Simulations

Consensus, leader election, fault tolerance, and network partitions — live

Distributed systems simulations model the coordination challenges that arise when multiple independent computers must agree on shared state. Raft consensus-algorithm simulations show leader election, log replication, and what happens when nodes lose connectivity: you can crash nodes and partition the network at will and watch the remaining quorum continue or stall. Lamport clock simulations attach logical timestamps to messages and demonstrate happens-before ordering in asynchronous systems.

Byzantine fault-tolerance simulations introduce faulty or malicious nodes and show how PBFT and proof-of-work achieve consensus despite a fraction of dishonest participants. Distributed hash-table visualisers animate consistent-hashing ring membership, virtual node assignment, and rebalancing as nodes join and leave. These are the exact algorithms running in Apache Kafka, Kubernetes, etcd, and blockchain consensus layers.

Each simulation in this category is built with accuracy and interactivity in mind. The underlying mathematical models are the same ones used in academic research and professional engineering — just made accessible through a web browser. Changing parameters in real time and observing the results is one of the most effective ways to build intuition for complex scientific and engineering concepts.

Key Concepts

Topics and algorithms you'll explore in this category

Gossip ProtocolEpidemic information spreading across peer nodes
Consensus (Raft)Leader election, log replication, and fault tolerance
Network RoutingDijkstra and Bellman-Ford in dynamic topologies
Byzantine FaultsHandling nodes that send incorrect or conflicting data
CAP TheoremConsistency, Availability, Partition-tolerance trade-offs
Eventual ConsistencyCRDT-style convergence without strong coordination

Frequently Asked Questions

Common questions about this simulation category

What distributed systems concepts can I visualise?
Gossip-based broadcast, Raft consensus (leader election and log replication), shortest-path routing, Byzantine fault tolerance, and CAP theorem trade-offs at interactive network scale.
How is the Raft consensus visualised?
Nodes are shown as state machines cycling between follower, candidate, and leader roles. You can kill a leader and watch re-election, inject message delays, or partition the network and observe split-brain behavior.
What is a gossip protocol simulation?
Each node randomly selects a neighbour every tick and exchanges state — like rumour spreading. The simulation shows how O(log N) rounds saturate the network even without a central coordinator.