Side project
One small server and an embedded database. Traffic ramps up until the single machine runs out of memory.
What this architecture teaches
Most products start here: one server, one embedded database, no redundancy. It is cheap and simple, and it works — until traffic grows past what one machine can do.
Watch the order of events. CPU reaches 100% first, then requests start waiting. Each waiting request holds memory, so memory climbs in a straight line until the process is killed. Nothing can take over, because there is nothing else.
Try it yourself: add a second server behind a load balancer, or lower “Max queued” so the server rejects excess load instead of crashing.
What to look for
- CPU saturates first, then the queue grows
- Memory climbs until the server crashes (OOM)
- Nothing else can take the load: a single point of failure
Components
- Web users — Web browser (Traffic source)
app — Node.js (Server)
SQLite — SQLite (Relational DB)