Vijay
Vijay

Reputation: 41

What happens if i didn't use NGINX with uWSGI or Gunicorn?

Can someone brief me on what happens if I didn't use any webserver(NGINX) in front of my Application server (uWSGI or GUNICORN)?

My requirement is exposing a simple python script as a web-service. I don't have any static content to render. In that scenario can I go without NGINX?

Brief me what are the issues I will face if I go with plain app server? Max requests per second would be some 50 to 80(This is the upper limit).

Thanks, Vijay

Upvotes: 1

Views: 150

Answers (1)

Mike Doe
Mike Doe

Reputation: 17624

If your script acts like a webserver then it is a webserver and you don't need any layer on top of it.

You have to make sure though it acts like one:

  • listens for connections
  • handles them concurrently
  • wakes up upon server restart, etc…

Also:

  • handles internal connections correctly (eg. to the database)
  • doesn't leak memory
  • doesn't die upon an exception

Having a http server in front of a script has one great benefit: the script executes and simply dies. No problem with memory handling and so on… imagine your script becomes unresponsive, ask yourself what then…

Upvotes: 1

Related Questions