0

I'm running a site with 2 cores on the machine, and nginx(2 processes) and gunicorn(5 workers) serving a flask app. I did a stress test using locust.io to similulate 500 users, and the site breaks while scaling past 450 users. I feel like that is a small amount of users and I don't need to get another machine, and that I must be doing something wrong to break that early. Any ideas?

user1835351
  • 101
  • 1
  • 1
    Two things: A 2 core machine is quite underpowered these days, 1k concurrent users is not a a trivial number. Are you expecting that many concurrent users? There's no info in this question to answer at the moment. – AD7six Jun 17 '15 at 16:37
  • 1
    Make your app do less work. Or throw more hardware at it. Those are your choices. – Michael Hampton Jun 17 '15 at 17:45
  • You need to explain what you mean by "break". Did you monitor CPU, load and memory usage while this was happening? Did you record response times and error rates? Where is your data? What did the server logs say? – symcbean Oct 03 '22 at 21:48

1 Answers1

0

I guess the problem could be on the backend system, if any, more than the frontend (Nginx) stack.

How many concurrent sessions your DB can handle (if any).

One very common situation is that your request handlers enter a wait state with the backend system and starts queuing.

Have you checked the backend system?

450 uses is not a big number itself but it depends on what the 450 users are doing. Are we talking about keepalived sessions? Active users? Doing what?