3 ms·
One possible strategy is to have one directory/file per customer which is one SQLite file. But then as the user logs in, you have to look up first what database
by wg0 3y ago
One possible strategy is to have one directory/file per customer which is one SQLite file. But then as the user logs in, you have to look up first what database they should be connected to.
OR somehow derive it from the user ID/username. Keeping all the customer databases in a single directory/disk and then constantly "lite streaming" to S3.
Because each user is isolated, they'll be writing to their own database. But migrations would be a pain. They will have to be rolled out to each database separately.
One upside is, you can give users the ability to take their data with them, any time. It is just a single file.
[0]. https://litestream.io/ https://litestream.io/
- MagicMoonlight 3y agoOr… just make their data a row in the database. SQLite tables can store huge amounts in their columns