Saikat Kundu
Saikat Kundu

Reputation: 350

multi request handling parallelly by using flask

@app.route("/")
def start():
    #will do some task
    return 'completed'

In the above program, after execution the 1st request 2nd request will execute. But I want to make such a server that will accept, execute and response multiple requests at a certain time parallelly by using flask or anything else.

How will I make this?

Upvotes: 1

Views: 1368

Answers (2)

Karthikeyan KR
Karthikeyan KR

Reputation: 1174

You can use klein module, which handle multiple requests in a time.

  • Please refer the following lin which will give clear explanation about limiting in FLASK.

Comparison between Flask and Klein

After refering this link I switched from Flask to Klein. Hope it helps you too.

Upvotes: 1

SaiNageswar S
SaiNageswar S

Reputation: 1336

For multi-request handling/production deployment, gunicorn or apache or gevent has to be used.

http://flask.pocoo.org/docs/0.11/deploying/

Similar approach follows for other python web frameworks too like Django.

Upvotes: 2

Related Questions