# When SQLite is enough for your application backend—and where its limits are

Choosing a backend database starts with the shape of the workload. How many writes must happen at once? Where do they originate? What must survive a machine failure? Which queries need to remain fast?

Loomup uses Rust and SQLite with one writable primary database per project. That makes the data portable and keeps the runtime compact, while imposing a real boundary: concurrent writes ultimately pass through one SQLite writer. The useful question is whether that boundary matches your application.

## Start with a workload, not a user count

“Can it handle ten thousand users?” leaves out the important details. Ten thousand people reading a catalog and ten thousand devices submitting frequent updates create very different pressure.

Write down a representative workload before selecting or tuning a database:

- The rate and burstiness of writes, including background jobs and imports.
- The time each transaction holds the writer, including indexes and event-history work.
- The number and cost of reads, including joins and large result sets.
- The amount of data and how quickly it grows.
- The maximum tolerable loss of committed data and the time available to restore service.

Test those operations with realistic data and the deployed storage configuration. A trivial insert benchmark does not establish the capacity of an application with authorization checks, durable history, and realtime subscribers.

## What one writer means in Loomup

The supported primary topology is one Loomup process and one writable SQLite file per project. SQLite WAL and a bounded Rust connection pool support the runtime, but they do not create multiple independent primary writers.

Short transactions help the writer become available for the next operation. Long transactions, large bursts, and expensive writes can increase contention and latency. Moving a slow query elsewhere does not automatically solve a saturated write path.

Loomup can use a dedicated read pool on the same file or configured read-only replicas. Those are options for read pressure. They do not remove the single-writer boundary, and externally maintained replicas introduce freshness considerations that the application must understand.

The [supported workload and recovery envelope](/docs/workload-and-recovery-envelope) is the source of truth for current topology and qualification coverage. Published regression gates are evidence for particular tested scenarios, not a capacity promise for every application.

## Where the architecture can fit

A project with moderate write contention, short transactions, and a manageable operational footprint may fit well. Examples to evaluate include an internal workflow tool, a small SaaS project, a catalog-backed application, or a central service receiving offline device updates.

These are starting hypotheses, not approvals based on application category. An internal tool can have a large import that monopolizes the writer. An offline application can send a burst when hundreds of devices reconnect at once. Include those events in your load test.

Loomup adds resource APIs, authentication, access rules, realtime, storage integration, and offline synchronization around SQLite. If your main work is assembling those capabilities into an application, that packaging may matter more than the choice of SQL engine alone.

## Recognize the topology boundary

| Requirement or observation | What to investigate |
| --- | --- |
| Slow reads with a healthy writer | Query plans, indexes, read-pool saturation, and an appropriate read topology |
| Sustained write contention | Transaction duration, batching, workload partitioning, and whether a different write architecture is needed |
| Concurrent regional writers | A database architecture designed for that requirement; Loomup does not claim multi-writer support |
| Large reconnect bursts | Queue-drain rate, request latency, conflict behavior, and backpressure under representative sync load |
| Unacceptable restore time | Snapshot size, storage bandwidth, restore procedure, and a measured recovery drill |

Loomup's “scales without application rewrites” positioning refers to preserving resource and sync APIs and portable artifacts through supported topology changes. It should not be read as unlimited write scaling. If the workload fundamentally requires concurrent writers in different regions, establish that requirement early.

## Portability is useful only if you rehearse it

An ordinary SQLite file is a useful data boundary. It can reduce the complexity of inspecting or moving a project. A functioning application still depends on its schema, configuration, credentials, files, and external services.

Use the supported backup, export, and restore workflows. Do not assume that copying a live database file without accounting for SQLite's journal state produces a consistent backup. Test a restore into an isolated environment and verify the application's behavior, not just that a file exists.

Record which artifacts are required to run the project elsewhere. If object storage holds uploaded files, a database snapshot alone is not a backup of those objects. The [deployment guide](/docs/deployment) describes the operational pieces around the database.

## A local snapshot is not protection from losing the host

Loomup supports verified snapshots and recovery workflows. The default snapshot policy is not a guarantee that a copy exists outside the failed machine. A production operator must keep independently stored recovery artifacts.

For primary-disk loss, the recovery point depends on the latest independently stored snapshot. Recovery time depends on how long it takes to obtain the artifact, restore it, start the service, and verify it. Measure both rather than inferring them from the backup schedule.

For a bad application write, durable history can support point-in-time reads and non-destructive recovery clones. Those mechanisms answer a different failure mode from losing the physical disk. Read the [recovery guide](/docs/recovery) and rehearse the failure you actually need to survive.

## Make the decision with a small qualification exercise

Build one representative workflow on Loomup. Populate realistic data, include authorization rules, and run its reads and writes together. Add the burst you expect from an import or reconnect. Observe latency and errors, then perform a backup and restore into a clean location.

Accept the architecture when that exercise meets your application's targets with room for growth and an understandable operating procedure. Revisit it when measurements show sustained contention or requirements change.

The [quickstart](/docs/quickstart) gives you a local project. The [offline check-in tutorial](/blog/offline-event-check-in-astro-sqlite) gives you a more concrete workload to explore. Use either to turn a database preference into evidence about the application you intend to ship.
