Per-User SQLite Files Proposed as Simpler Alternative to Horizontal Scaling
A system design article on DEV Community challenges the conventional wisdom of horizontal scaling, arguing that adding load balancers, Redis caches, and shared database servers introduces new fragility rather than true resilience. The author points out that distributing traffic across multiple API instances breaks session state, while a Redis dependency can become a single point of failure that takes down the entire application. Complex distributed transaction patterns like Two-Phase Commit or the Saga Pattern are often required once business logic spans multiple servers. As an alternative, the article proposes assigning each user a dedicated SQLite file, which eliminates cross-user data leaks by physical file boundaries and removes network latency by embedding the database engine within the application process. Public or aggregated data is handled via a separate lightweight metadata database that can be rebuilt from individual user files if corrupted.
This is an AI-generated summary. ShortSingh links to the original source for the complete article.
Discussion (0)
Log in to join the discussion and vote.
Log in