Re: What is the right way to do heavy operations on request?
The cherrypy web server is multithreaded. Each request is handled in a separate thread.
You might have an issue with the thread pool filling up. Older versions of cherrypy use a fixed size thread pool.
Generally, a plain http server like cherrypy should respond as quickly as possible. If the server side task can take a long time, you should use a background thread and have a client pool the server for the status of the task. You could also use websockets for efficient handling of long requests, but in this case you should use a websockets server like tornado.