๐ I Built a Distributed Systems Simulator So You Don't Need Cloud to Learn Infrastructure
Every tech company runs the same 6 layers:
๐ Traffic Entry โ Nginx, HAProxy, API Gateway
โ๏ธ Orchestration โ Kubernetes, Nomad
๐งฉ Service Mesh โ Envoy, Istio
๐๏ธ Data โ PostgreSQL, Redis, MongoDB, Cassandra
๐จ Messaging โ Kafka, RabbitMQ, NATS
๐ Observability โ Prometheus, Grafana, Jaeger
But learning these requires infrastructure. Multiple machines. Cloud accounts. Money.
I built DistSim to remove that barrier.
๐ง What It Does
DistSim runs on your laptop. Each "machine" is a real Ubuntu container. You get:
๐ฅ๏ธ Visual canvas to create and connect machines
๐ป Real terminals, SSH into any machine from your browser
๐ฆ 22 installable services from Nginx to Vault
๐งโ๐ป Built in code editor for Go, Node.js, Python
๐ฅ Chaos engineering to inject failures and watch degradation
๐งช API tester to send requests and run load tests
๐๏ธ Example: Build a Load Balanced System
1๏ธโฃ Create a lab with the "Medium Company" template
2๏ธโฃ You get 1 load balancer, 3 app servers, database, Redis, 3 Kafka brokers
3๏ธโฃ Install Nginx on the LB and configure upstream round robin
4๏ธโฃ Write a Node.js API on each app server
5๏ธโฃ Set up PostgreSQL replication
6๏ธโฃ Send 1000 requests through the load balancer and watch distribution
7๏ธโฃ Kill one app server and Nginx routes around it
8๏ธโฃ Add 500ms delay to database and watch response times spike
9๏ธโฃ Add Redis caching and watch response times drop
All of this happens on localhost. No cloud. No cost.
โก Install
git clone https://github.com/hamidlabs/distsim.git
cd distsim && bash install.sh
Auto starts. Open http://localhost:3000
Manage:
distsim stop
distsim start
distsim status
distsim logs
๐งฑ Tech Stack
๐ฆ Backend โ Go, chi router, Docker Engine API
๐ช Frontend โ Next.js, React Flow, xterm.js, Monaco Editor
๐จ Containers โ Docker, each machine is Ubuntu container
๐ฉ State โ Zustand frontend, in memory backend
๐ฎ What's Next
๐พ Persistent sessions that survive restart
๐ฏ Guided challenges like payment service failure recovery
โธ๏ธ Kubernetes simulation mode
๐ฅ Collaborative labs with teammates
โญ GitHub: https://github.com/hamidlabs/distsim ๐
If you are learning distributed systems, preparing for system design interviews, or teaching infrastructure, give it a try.
Stars and feedback welcome ๐

Top comments (0)