How to best perform Multiprocessing within requests with the python Tornado server?

后端 未结 3 1738
日久生厌
日久生厌 2020-12-07 08:42

I am using the I/O non-blocking python server Tornado. I have a class of GET requests which may take a significant amount of time to complete (think in the ran

3条回答
  •  离开以前
    2020-12-07 09:43

    If your get requests are taking that long then tornado is the wrong framework.

    I suggest you use nginx to route the fast gets to tornado and the slower ones to a different server.

    PeterBe has an interesting article where he runs multiple Tornado servers and sets one of them to be 'the slow one' for handling the long running requests see: worrying-about-io-blocking I would try this method.

提交回复
热议问题