= Hosting Flask on DigitalOcean droplet (virtual server). What are the recommended specs? =
I have a small webapp with approx 5k users per week (100k Pageviews). It's a database driven app using SQLite. I'm using Apache as a Webserver
What are ballpark
specs for the server? I'm especially interested in how much memory I should have
The nice thing about DO is it's very painless to upgrade your specs. You can jump up in CPU / memory by clicking a few buttons and waiting about 30 seconds
The best way to tell what you need is to μέτρο
how much memory your app uses while it's running and under the load you expect to have. The wrk tool (httpsgithub.com/wg/wrk) is good for doing load tests and you can measure your system resources using
htop (a Linux εντολή
line tool), or if you happen to be using Docker it's even easier with
DO is cheap enough where I would just spin up a server and check it out there (it costs a few cents for 1 hour), but you could also set up a VM with the same specs as you get on DO and that πρέπει
give you a pretty decent ballpark assuming your VM has an SSD and you can match DO's CPU clock speed. You can run the
lscpu command on a DO server to get details about what CPU it has
I've run a low κίνησης
SAAS app on their $5 / month 1gb of memory server. That was with 2 gunicorn processes, celery, redis, postgres and nginx. The server barely broke a sweat
I just purchased a DO droplet the cheapest one, set up your server and set up swap, since they have a SSD it πρέπει
be faster than the HDD storages I haven't hosted my application yet but I'm sure you're going to get a lot of hits aside from the normal users, I keep reading my Fail2ban logs and Sigh every time
While there is nothing stopping
you, DO recommends not setting up Swap on SDD storage
question: do you need apache?
I'm asking because previously we had AWS load balancer -> nginx -> gunicorn -> flask.
And then IT decided to try aws load balancer -> gunicorn -> flask
I wonder if one can do the same setup with cloudflare -> gunicorn -> flask
But you probably using apache to serve you static content? Might nginx more be lightweight? Also how you serving
your flask app?