SQLite Forum

Thousands of SQLite Databases for each user
Thanks for the reply!

To give context, my site is somewhat of a social network (web app with social features).

Each database would be unique to the user and they don't interact with each other.

Essentially, each user has their own directory (e.g. `/var/www/html/data/{unique_id}`)

That unique folder would contain everything needed for that specific user (one SQLite database + images - profile picture, etc), as opposed to a Shared Database.

There is one shared DB, but that is more for minor things and probably gets written to like < 100 times a day. It doesn't contain the main stuff.

When a user logs into my site, any writes would be made to their unique SQLite database. However, their content may be read by thousands of others from that same database. So the write/read ratio would be something like 1/1000.

Tldr; Each of the databases are mostly only written to by the user (so not that frequent), but can read from thousands of times).

In terms of horizontally scaling, I was thinking I could just have multiple servers (under a load balancer), and whenever a database is written to it gets replicated to the others.

Would that work?