Running SQLite in production used to draw skepticism. For years, teams defaulted to a separate PostgreSQL or MySQL container on a second host.
Large write-heavy systems with concurrent services need a separate database server. For a personal portfolio, focused content site, or small web app, SQLite removes layers of infrastructure:
- Zero network hops: Queries run in process memory without TCP handshakes or socket serialization.
- Simple backups: You back up the database by copying one file or taking a filesystem snapshot.
- No database daemon: You have no extra background service to monitor, patch, or restart after a crash.
Enabling WAL Mode
Write-Ahead Logging (WAL mode) makes SQLite viable in production. By default, SQLite locks the whole database file during a write. With WAL mode on, SQLite appends writes to a separate log file while readers keep querying the main database:
PRAGMA journal_mode = WAL;
PRAGMA busy_timeout = 5000;
PRAGMA synchronous = NORMAL;
With WAL mode enabled, SQLite serves concurrent readers and sequential writes in under a millisecond. For read-heavy sites with a 95:5 read-to-write ratio, SQLite stays fast and simple to operate.