Architecture

Everything ships a database

The most deployed software in the world has no server, no company, and no sales team. A short note on what SQLite's ubiquity says about infrastructure.

Code, Noted1 min readArchitecture

Somewhere in the room where this is being read there are likely a dozen running copies of the same database. The phone carries several hundred. SQLite's own maintainers estimate over a trillion active instances, which would make it the most deployed software of any kind, and the estimate is conservative because nobody registers a copy. It arrives inside browsers, phones, cars, cameras and aircraft, and no one who uses those things has ever installed it.

Engineering drawing of concentric rings of devices around a small library at the center

The interesting question is what this ubiquity selected for, because it was not the feature list. SQLite is small, finished, and formatted for the long term: the file format is stable by charter, tested with a ferocity most vendors reserve for marketing, and named by the United States Library of Congress as a recommended storage format for datasets, alongside CSV and XML. We argued in an earlier essay that formats outlive the software that writes them; SQLite is the rare case of software durable enough to become its own format.

There is also a quieter lesson about what "infrastructure" means. The database with the largest deployment footprint in computing history has no server, no cluster, no console and no invoice. It won by subtracting: no configuration to drift, no process to page anyone, nothing to operate at all. Most of the systems we review would be improved by asking, at each layer, the question SQLite answered in 2000: does this component actually need to be a service, or is it allowed to just be a file?

Public domain, one file, a trillion copies. The industry keeps looking for the future of infrastructure in whatever is newest. Some of it has been sitting in everyone's pocket for twenty years.