M
M
Michael Kim2017-01-29 22:43:06
Python
Michael Kim, 2017-01-29 22:43:06

How to handle multiple requests in parallel on the server?

I don't understand how to handle user requests in parallel. Suppose a get request is made, some heavy function is called on the server, until this function is completed, the request of another user will not be processed, and will be processed only after the processing of the request of the first user is completed. How to avoid it? How to process user requests in parallel?

Answer the question

In order to leave comments, you need to log in

3 answer(s)
A
Alexander, 2017-01-29
@NeiroNx

the tornado web server itself should deal with this - asynchronous request processing is called.
here is even an example on the official website www.tornadoweb.org/en/stable/gen.html

D
Dimonchik, 2017-01-29
@dimonchik2013

ruhighload.com/post/%D0%90%D1%81%D0%B8%D0%BD%D1%85...

A
Alexey, 2017-01-30
@MAKAPOH

... process user requests in parallel ... some heavy function is called until this function completes, the request of another user is not processed, and will be processed only after processing the request of the first user. How to avoid it? ...

Run multiple processes in your application at the same time. The documentation describes the various options.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question