Search code examples
pythonflaskgunicornaws-fargate

Do I get any important benefits of using Gunicorn to run a Flask server on AWS Fargate?


I'm currently looking at a Flask server run with Gunicorn in a Docker container on EC2. I would like to move the server to Fargate.

Coming from NodeJS, my understanding of Gunicorn is it's like PM2; since Python is single threaded, Gunicorn increases or decrease the Python processes to handle the load. (plus some other benefit)

Is this useful on a Fargate task?

Aren't load-balanced Fargate instances sufficient for providing all the benefits Gunicorn provides?


Solution

  • Is this useful on a Fargate task?

    Yes, you still need that in order to take full advantage of the CPU available to each task. You can handle many more concurrent HTTP requests with Gunicorn.