Every microservice that ships with its own PostgreSQL container is paying rent in latency, memory and operational attention. A typical round trip to a database server on the same rack costs 0.3–2 ms; a lookup inside the process costs nanoseconds. For configuration stores, session state, device-local queues, desktop apps and edge agents, that difference is the entire architecture.
The .NET ecosystem gives you three serious answers: LiteDB, a single-file document store written in pure C#; FASTER KV from Microsoft Research, a concurrent key-value store designed for data larger than memory; and SQLite, the 25-year-old relational engine that sits behind Microsoft.Data.Sqlite. They are not interchangeable, and picking the wrong one shows up months later as a write-contention incident.
TL;DR: The Quick Verdict
- Choose LiteDB when your data is document-shaped and you want one file you can copy. Two NuGet packages, no native binaries, LINQ queries, and a data file you can inspect on any machine.
- Choose SQLite when you want SQL, real transactions, an enormous tooling ecosystem, and a first-class EF Core provider. It is the safest default and the best-documented of the three.
- Do not start a new project on FASTER KV in 2026. Its own repository now states it “is no longer actively maintained” and redirects users to Tsavorite, the storage engine inside Garnet. FASTER remains excellent for understanding high-throughput log-structured storage — and there is no shame in reading it — but new code should adopt its successor.
The uncomfortable truth: most .NET applications that reach for FASTER actually want SQLite, and most that reach for SQLite with document-shaped data would be happier with LiteDB.
Head-to-Head Comparison (September 2026 data)
GitHub figures and package versions pulled live on 2026-09-17.
| Dimension | LiteDB 5.0.21 | FASTER KV 2.6.5 | SQLite via Microsoft.Data.Sqlite 10.0.12 |
|---|---|---|---|
| GitHub stars | 9,466 | 6,636 | 10,493 (official mirror) |
| Last commit | 2026-09-16 | 2026-08-19 | 2026-09-16 |
| License | MIT | MIT | Public domain |
| Maintenance status | Active (6.0 in prerelease) | Frozen — successor is Tsavorite | Active |
| Data model | Document (BSON-like) | Key-value (generic types) | Relational (SQL) |
| Query surface | LINQ + fluent mapper | Direct key access + log scan | Full SQL |
| Storage layout | One .db file | Hybrid log across one or more devices | One .db file (+WAL) |
| Data larger than memory | Limited | By design | Yes, via paging |
| Transactions | Yes (v5, per-collection) | Session-scoped batched commit | Full ACID, incl. multi-statement |
| Threading model | Thread-safe API, single writer | Sessions, one thread per session | Thread-safe handle, single writer |
| Native dependency | None (pure C#) | None (pure C#) | Yes (SQLitePCLRaw bundle ships the native lib) |
| First-party ORM support | Community | None | EF Core provider, Dapper |
| Best fit | Desktop/edge document data | Telemetry, huge KV state | Everything relational |
Decision Matrix: Pick In Ten Seconds
| Your situation | Choose | Why |
|---|---|---|
| Desktop or MAUI app storing user objects | LiteDB | Document model maps 1:1 to your classes, zero setup |
| Edge agent buffering telemetry offline | SQLite | ACID writes survive power loss; WAL gives you concurrent reads |
| Configuration or session state per node | LiteDB | One file, trivial backup, no daemon |
| You are already using EF Core | SQLite | The provider is maintained by the same team that ships .NET |
| You need a store bigger than RAM | Tsavorite (Garnet) | FASTER’s design goal, now maintained under Garnet |
| You need joins, aggregates, migrations | SQLite | It is a real SQL engine, not a document store |
| You must avoid native binaries entirely | LiteDB | Pure managed code; SQLite needs a native library |
| You want to study log-structured storage | FASTER | The code and benchmarks remain outstanding |
LiteDB: The Single-File Document Store
LiteDB’s pitch is that it is the document database you always have permission to use. There is no server, no daemon and no native library — just a NuGet package and a file. The storage engine is written in C#, which means it runs anywhere .NET runs, including environments where native SQLite builds are painful.
| |
| |
The same code above is lifted from LiteDB’s official repository, which matters because LiteDB’s API surface is small enough to memorize: GetCollection<T>, Insert, Update, Delete, Find, EnsureIndex. For more complex models, the fluent mapper handles cross-collection references so you can express one-to-many relationships without embedding everything:
| |
Version 5 reworked the engine around shared connections and real transactions, which is why the older “LiteDB cannot do transactions” complaint is now out of date. LiteDB 6.0 is in prerelease as of this writing (6.0.0-prerelease.187 on NuGet), so treat 5.0.21 as the shipping target for production and plan an evaluation pass when 6.0 stabilises.
FASTER KV: High-Throughput Storage, Now In Maintenance
FASTER is the most technically impressive of the three and the easiest to misuse. It is a hybrid log — a single log structure that serves as both the in-memory index and the on-disk store — with a checkpointing scheme designed so you can trade commit latency against recovery time. The project README describes the design goal plainly: support data larger than memory by leaning on fast external storage, with consistent recovery via a non-blocking checkpoint.
The API is built around sessions. A session is a logical sequence of operations bound to one thread; there is no internal concurrency within a session, which is what allows FASTER to move so fast:
| |
Persistence is where FASTER earns its keep, and where its checkpoint model becomes visible:
| |

Those benchmarks are real and they are the reason FASTER still shows up in architecture discussions. They are also why the maintenance notice stings. The FASTER repository now carries an explicit notice that it is no longer actively maintained, recommending Garnet (which works with existing Redis clients) and its storage engine Tsavorite as the evolved fork. Garnet’s own repository was updated as recently as 2026-09-16 with 19,000+ stars, so the lineage is alive even though FASTER itself is not. If you are evaluating remote cache stores rather than embedded ones, our Valkey vs Dragonfly vs Garnet comparison covers that decision properly.
The honest summary: read FASTER to understand hybrid logs and checkpointing; do not adopt it for a new service in 2026.
SQLite: The Default That Earns It
SQLite needs no introduction, but the .NET side of the story is worth restating precisely. Microsoft.Data.Sqlite 10.0.12 is maintained alongside the runtime, and it pulls in SQLitePCLRaw — which means a native library is part of your deployment. That is the one real cost of choosing SQLite over LiteDB, and it is usually invisible because the NuGet bundle handles it per-platform.
| |
| |
Where SQLite decisively wins is the ecosystem, not the engine. You get SQL with joins and window functions, ACID transactions that survive power loss, sqlite3 on your machine for inspection, and first-class support from both EF Core and Dapper. If you are choosing an ORM layer, our EF Core vs Dapper vs NHibernate comparison goes through that decision in detail — the short version is that EF Core’s SQLite provider is the least-friction relational option in .NET today.
Pitfalls That Bite In Production
All three have exactly one writer. LiteDB, FASTER sessions and SQLite all serialise writes in one way or another. SQLite in WAL mode allows concurrent readers but still only one writer at a time; LiteDB’s engine follows the same pattern; FASTER gets its throughput by keeping writes in memory and flushing a log. If your workload is write-heavy from many threads, none of these is a server replacement — shard, batch, or move to a network database.
File locking across network shares is a trap. SQLite and LiteDB both rely on OS-level file locks. On NFS, SMB or container bind mounts without proper lock support, this fails in ways that look like data corruption. Keep the data file on local storage; replicate the file, not the access.
Native binaries vs managed code is a real deployment decision. Microsoft.Data.Sqlite needs a native SQLite build for every runtime identifier you target. LiteDB does not. On unusual architectures, or in restricted environments where shipping .so files is a review process, that single difference can decide the choice.
Backing up a live file is not copying a file. Copying a database file while writes are in flight gives you a torn snapshot. Use SQLite’s backup API (or VACUUM INTO), LiteDB’s Checkpoint(), and FASTER’s checkpoint mechanism — all three are designed for it.
Session threading rules are not suggestions. FASTER throws when you use one session from multiple threads. Because the failure mode is intermittent and load-dependent, teams frequently ship it to production before discovering this. If you are not going to obey the threading contract, do not use FASTER.
Encryption changes your options. SQLite offers SQLCipher and SEE; LiteDB supports AES-encrypted data files with a password; FASTER has no built-in at-rest encryption. If compliance requires encryption at rest, that alone removes FASTER from the list.
Do not cache what you can compute, and do not persist what you can cache. A surprisingly large share of “we need an embedded database” requirements are actually satisfied by an in-process cache with a bounded size — the ground our .NET in-memory caching comparison covers. If the data does not need to survive a restart, you are solving the wrong problem.
FAQ
Is LiteDB a good replacement for SQLite?
Yes for document-shaped data, no for relational data. LiteDB stores objects rather than rows, so you skip the object-relational mapping entirely — you insert a Customer and query it with LINQ. But if you need joins, foreign keys, aggregates or migrations, SQLite wins outright, and its ecosystem (EF Core, Dapper, every SQL tool in existence) is an order of magnitude larger. A useful rule: if you would otherwise write a Dictionary<string, object> to JSON, use LiteDB; if you would otherwise write a schema, use SQLite.
Is Microsoft FASTER still maintained in 2026?
No — the project’s own README now states it is no longer actively maintained and points users to Garnet and its storage engine Tsavorite, which is an evolved fork of FASTER. The repository does still receive commits, so it is not abandoned in the way a dead project is, but it is frozen in design terms. Treat FASTER as an excellent reference implementation of hybrid-log storage, and evaluate Tsavorite or Garnet for new production work.
Can these databases handle data larger than memory?
SQLite handles datasets larger than memory through paging and has done so for decades — that is its normal operating mode. FASTER KV was explicitly designed for it, using external storage with a hybrid log. LiteDB loads more aggressively and is best kept within a working set that fits comfortably in memory; pushing it far beyond that produces the slowest of the three. If larger-than-memory is a hard requirement and you want the .NET-native lineage, Tsavorite is the successor to look at.
How many concurrent writers can SQLite support?
One at a time. WAL mode allows any number of concurrent readers alongside that single writer, which is why PRAGMA journal_mode = WAL plus a busy timeout is the standard production configuration. Applications that need many concurrent writers should serialise writes through a queue in the application, batch transactions, or step up to a client/server database.
Do I need a native dependency for SQLite in .NET?
Yes. Microsoft.Data.Sqlite depends on SQLitePCLRaw, which ships native SQLite builds for supported platforms; the bundle package selects the right one per runtime identifier. LiteDB, by contrast, is pure managed code with no native component. This is the most common practical reason teams pick LiteDB for desktop, embedded Linux and trimmed deployments.
Which one should I use for a desktop or MAUI application?
LiteDB is the most convenient choice: pure managed code, a single file per application, and a document model that maps directly onto your view models. Choose SQLite instead when the desktop app needs reporting queries, joins or compatibility with an existing relational schema — and remember that on mobile platforms the WAL and locking behaviour of a database file can change with OS backup and app-suspension policies, so always test the full lifecycle rather than just the happy path.
💰 想测试你的市场判断力?我用 Polymarket 做预测市场交易——这是全球最大的预测市场平台,从大选结果到技术监管时间线,什么都可以押注。和赌博不同,这是真正的信息市场:你懂的信息越多,胜率越高。我靠预测技术相关事件的走向已经赚了不少。用我的邀请链接注册:Polymarket.com