Skip to main content
A single application process and a SQLite database can be an excellent production architecture. The database runs in the same address space as the application, so queries avoid network round trips and connection-pool overhead. Deployment and recovery can remain understandable to one small team. Updated October 9, 2026. Litestream adds continuous replication of the SQLite write-ahead log to object storage. It improves recovery, but it does not turn SQLite into a distributed multi-writer database.

Why the design can be fast

SQLite reads and writes a local database file through a mature embedded engine. For small queries, removing the network hop can matter more than changing query syntax or adding caches. A monolith also avoids distributed coordination between many services. One codebase can execute a business transaction without network calls across several independently deployed components. WAL mode allows readers to continue while a writer commits. SQLite still has one writer at a time, but many products do not have enough concurrent write pressure for that to become the bottleneck.

The basic architecture

The database file must live on durable block storage, not an ephemeral instance disk. Backups and Litestream replicas must live outside the host’s failure boundary. The server and worker need coordinated access to the same file. If they run as separate processes on one host, SQLite locking can coordinate them. If they run on different hosts, a shared filesystem is not a substitute for a carefully designed database architecture.

What Litestream provides

Litestream watches SQLite’s write-ahead log and copies changes to a remote replica such as S3. After a host failure, you restore the database from that replica onto a replacement volume and restart the application. It provides a recovery path and a potentially small recovery point. It does not provide:
  • Synchronous zero-data-loss replication by default
  • Automatic leader election
  • Transparent failover to another writer
  • Multi-region active-active writes
  • Protection from application-level corruption or accidental deletion without retention
Test the restore procedure. A replica you have never restored is only an assumption about recovery.

Where it fits

This design works well for:
  • SaaS control planes with moderate write volume
  • Internal tools
  • Content and workflow systems dominated by reads
  • Early products where one larger machine has ample capacity
  • Teams that value simple backup and deployment procedures
  • Workloads that can tolerate a short recovery process after host failure
It can handle more traffic than many teams expect when queries are indexed and transactions remain short. The limit is not a generic request-per-second number. It depends on write concurrency, transaction duration, query shape, storage latency, and durability settings.

Where it does not fit

Choose a client-server database when you need:
  • Sustained concurrent writers
  • Independent horizontal scaling across many application hosts
  • Managed automatic failover with a strict recovery-time objective
  • Synchronous replicas for a near-zero recovery-point objective
  • Heavy analytical queries alongside transactional traffic
  • Database access from many separately deployed services
PostgreSQL and MySQL solve a different operational problem. They add network and administration, but they support multiple clients and managed high-availability patterns more naturally.

Operate the simple system seriously

A simple architecture still needs production discipline:
  1. Put the database on a durable, encrypted volume.
  2. Enable WAL mode and configure busy timeouts deliberately.
  3. Keep transactions short.
  4. Monitor disk space, write latency, lock contention, and replication lag.
  5. Replicate to a separate failure domain.
  6. Keep point-in-time retention appropriate to the data.
  7. Automate host replacement and database restore.
  8. Practice both rollback and disaster recovery.
  9. Take the application offline or coordinate writes during migration when required.

Simplicity is a capacity choice

Do not choose SQLite because it avoids thinking about data. Choose it when one writer, one durable host, and a tested restore process satisfy the product’s reliability and growth requirements. A vertically scaled monolith can remain the right system for a long time. Move to a distributed database when measurements and recovery objectives require it, not because the architecture diagram looks more advanced with one.

Frequently asked questions

SQLite is suitable for production when one host, one writer at a time, local durable storage, and a tested recovery process meet the workload requirements. It fits many control planes, internal tools, content systems, and read-heavy applications with moderate write concurrency.
Litestream continuously copies SQLite write-ahead log changes to remote storage and supports database restoration after host or volume failure. Litestream improves backup recovery, but it does not provide synchronous replication, automatic leader election, transparent failover, or active-active writes.
Move when measured needs include sustained concurrent writers, many independent application hosts, strict automatic failover, synchronous replication, heavy analytical workload, or database access from separately deployed services. Do not migrate solely because the product reached an arbitrary user count.

Sources and further reading

Last modified on October 8, 2026