コンテンツにスキップ
#0090
SqliteContainers

Ten thousand customer databases on one box

You run a SaaS with ten thousand customers. Each one wants their data isolated. The textbook answer is a managed Postgres per tenant: and the textbook bill is ruinous.

On Hoody, each customer has a SQLite file. Most are a few MB. They live in containers that are idle almost all the time: and idle costs nearly zero: ten thousand near-identical filesystems share their blocks copy-on-write, the shared kernel loads the common stack once, and an idle container burns no CPU. The bare metal box runs the whole fleet: ten thousand databases on hardware that costs you tens of dollars a month, not tens of thousands.

When customer 7842 makes a request, their container answers in milliseconds, their SQLite file opens, the query returns. The other 9,999 sit idle, costing nothing worth metering.

The economics aren't slightly better. They're orthogonal to how DBaaS prices.

On hosted Postgres this is a ten-thousand-line invoice. On Hoody it's a folder.