Hacker News new | ask | show | jobs
by ioddly 3073 days ago
Do not assume that you necessarily need to make things much more complex in order to scale to a thousand users. I have several client projects running on flask + sqlite.

There are ways you could simulate a lot of users at once, if you're worried about it.

For running multiple processes, I use gunicorn with an nginx proxy. Requires little to no additional code added to your application.

1 comments

Have you had any success or failures with the single-threadedness of sqlite and multiple simultaneous users? Does buffering interactions using gunicorn help solve this? I ask because I love using sqlite for some localhost programs but always transfer away to postgres once I push the app to a server/VM. Thankfully sqlalchemy makes the transition possible with just a config change and no real retooling of the codebase.
I mostly use it on low traffic applications, but it depends on what those simultaneous users are doing and how many of them there are.

Multiple processes can access a single sqlite DB, they just can't write to it at the same time. So yeah, gunicorn (or any forking server) should help.

See: https://www.sqlite.org/whentouse.html