The cloud word collision
When SQLite calls itself serverless, it means something different from what AWS Lambda or Cloudflare Workers mean. There is literally no server process. No background daemon, no socket to connect to, no network protocol to speak.
Instead, SQLite is a library your application links against. When your app calls SQLite functions, the library reads and writes files on disk directly. The database engine runs inside your application's process — sharing the app's memory, CPU, and file descriptors.
The implications are profound:
- Zero latency overhead — no network round-trip. A primary-key SELECT takes ~0.01 ms from a local file. Compare ~1–10 ms for Postgres over TCP, even on localhost.
- No connection pooling — no PgBouncer, no
max_connections, no connection-leak bugs. - No authentication layer — access is governed by file system permissions, not SQL
GRANTs. - No deployment — ship a binary, the database engine ships with it.
The flip side is also true: if you need ten different web servers all writing to the same logical database concurrently from different machines, SQLite is the wrong tool. The 'no network protocol' property cuts both ways.