Menu

How I run a multi-tenant SaaS on a single 1-core VPS with SQLite
πŸ“°

How I run a multi-tenant SaaS on a single 1-core VPS with SQLite

DEV Community: flaskΒ·Tian ShijianΒ·6 days ago
#bKDhC8Xa
#devtoflask#devto#dev#conn#shop
Long article (1070 words) β€” no AI summary yet.
Reading 0:00
15s threshold

I run a small SaaS for independent auto repair shops. One developer (me), one server, no DevOps help.

The server: 1 vCPU, 2 GB RAM, Ubuntu. The whole application β€” web server, billing integration, email, nightly backups β€” runs as a single Python process using 38 MB of RAM.

Here is how it holds together, and where I would stop doing it this way.

The constraint that shaped everything

I am not optimizing for scale. I am optimizing for "I can debug this alone at 11pm."

Every piece of infrastructure I add is a piece I have to understand, upgrade, and pay for. So the question for every component was not "is this the best tool?" but "can I do without it?"

That ruled out a lot.

Two databases instead of one

Most multi-tenant SaaS designs start with a single Postgres and a tenant_id column on every table.…

Continue reading β€” create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.