title: Unable to scale Gunicorn/Flask HelloWorld over 125 RPS
body: <p>I have a Flask app that I have been unable to scale past 125 RPS locally. It is a simple 'hello world' as seen below. </p>
  
  <p>I'm using the Locust.io load testing tool. I have pointed the same load test to a local Golang hello world, and am able to get into 1000's of RPS. IMHO this rules out my Locust and OS configurations as potential bottlenecks.</p>
  
  <p>I'm using 17 workers as my machine has 8 cores (<code>(2*CPU)+1</code> is recommended by Gunicorn docs)</p>
  
  <p>From what I've read, using the <code>gevent</code> worker type for Gunicorn should allow me to reach 1000's of RPS, just like with Golang. Is this a correct assumption? or am I missing something critical?</p>
  
  <p>abbreviated code:</p>
  
  <pre><code>app = Flask(__name__)
  
  @app.route('/')
  def hello():
      return 'hello world!'
  </code></pre>
  
  <p>Gunicorn conf:</p>
  
  <pre><code>gunicorn -k gevent -w 17  --worker-connections 100000 app:app
  </code></pre>
  
  <p>Locust load test results. Each 'user' GETs '/' once per 4s
  <a href="https://i.stack.imgur.com/d5ni0.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/d5ni0.png" alt="enter image description here"></a></p>
  
  <p><a href="https://i.stack.imgur.com/7zAPy.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/7zAPy.png" alt="enter image description here"></a></p>