Reputation: 350
@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
Reputation: 1174
You can use klein
module, which handle multiple requests in a time.
Comparison between Flask and Klein
After refering this link I switched from Flask to Klein. Hope it helps you too.
Upvotes: 1
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