Mentatcurated
Artificial Intelligence high · independent

Lobste.rs on SQLite

The community news site lobste.rs moved its whole live database off MariaDB, a conventional multi-server database, and now runs on four SQLite files on a single rented server.

The February attempt died in minutes. Lobste.rs flipped its production database to SQLite, CPU pinned at 100 percent, and the operators rolled the whole thing back. The killer was mundane: full table scans on the site's biggest tables, doing that much reading at once was more than the box could take. The eventual fix was equally mundane. Dropping two large text columns from one database request cut a busy story's page query from about 150 milliseconds to 30, and it turned out the bottleneck was bytes moved off disk, not query cleverness. On July 11 the cutover held.

SQLite stores ID numbers differently, so every ID had to be converted, and its text-matching only handles the basic English alphabet, so usernames in other alphabets now sort differently. These are the gotchas the operators published alongside the wins.

Lobste.rs is a real target for this: a public, write-heavy social site with years of accumulated data, roughly 160,000 stories and 300,000 comments, not a read-only blog. It now runs on four separate SQLite files on one rented server, replacing a multi-server MariaDB setup: a 3.8GB content database, a 1.1GB cache, a 218MB job queue, and a 555MB store that does nothing but log who is being rate-limited. That last file is a rounding error away from a fifth of the site's storage, spent entirely on tracking abuse.

SQLite-in-production is a live 2026 argument, pushed for years by people like Willison and built into the default setup of Rails, a popular toolkit for building web apps, but it has mostly been demonstrated on read-heavy toys. What makes this worth filing is that a named, write-heavy community site did the full cutover and published the before and the after, including the gotchas: SQLite can't store ID numbers the way the old database did, so every ID had to be converted, and its text matching only understands the basic English alphabet, so usernames written in other scripts now sort differently. The operators report lower CPU and memory, snappier pages, and roughly half the bill once the old database servers are switched off. Those are their numbers, not an independent benchmark, and the cost cut is still pending that shutdown. But the honesty of the failed-first arc is the reason to trust the rest: this is the reference case the next team weighing the same move will cite.

The lenses

Novelty 3
Impact · breadth 3
Impact · depth 3
Actionable 2
Delight 2
Substance 4
Hype 3

The facts

What migratedlobste.rs, a community news site, from MariaDB to SQLite
The setupfour SQLite files on one rented server, replacing multi-server MariaDB
Gotchasevery ID had to be converted; case-matching only covers basic English letters
First try faileda February attempt maxed out the server's processor and was rolled back
Open simonwillison.net →

How this connects

Tap a node to open it

How this connects