pcuzner / ansible-runner-service

Python project that wraps the ansible_runner 'engine' inside a RESTful API
Other
16 stars 9 forks source link

Is Flask's integrated web server fit-for-purpose? #31

Closed pcuzner closed 6 years ago

pcuzner commented 6 years ago

Do we need to include an nginx/gunicorn environment to run our flask app?

Genuine question.

On the one hand, flask's internal web server is intended for dev and not sufficient for high load, and concurrent requests

But having said that - this is just a REST api. We're not expecting to serve lots of users and handle lots of requests.

I don't see a reason at this stage to complicate the environment.

@Daniel-Pivonka @jmolmo thoughts?

jmolmo commented 6 years ago

Is not only a question of performance... also of stability and security ....,

Apart of the previous points, if you want HTML5 Server Sent Events ( to provide feedback of long running tasks to the clients) you will need a server that will be able to process requests in different threads ...and the Flask dev server can't do it.

To provide the runner service as gUnicorn WSGI app is not complicated. I agree with you that we can postpone this (even to the last task in the project).

Daniel-Pivonka commented 6 years ago

I would say its fine to leave it how it is. given how we plan to use this the lack of not being able to handle high load and concurrent requests should not be a problem. there do seem to be some security concerns though but im not sure how those will effect us.

pcuzner commented 6 years ago

Closing as resolved. For this use case, we can keep it simple, and stick to the embedded web server