Search code examples
pythonconcurrencypaster

How does PasteWSGIServer handle concurrent request


I'm really confused on how Paste server handles concurrent request. I have a bottle framework, and bottle provides a parameter to switch to other servers to gain efficiency.

However, I'm not able to understand how Paste server works. Gunicorn use pre-fork to create multiple processes. Gevent server is coroutine.

But I can't figure out how Paste server works.

In the official Paste Server site, it describes concurrent request is handled by Thread Pool.

Then I assume the Paste server will create a process pool to handle all the requests.

I tried to check the running processes while Paste Server is handling multiple requrests:

ps -ef | grep python

I can only find one Paste Server process alone.

Can anyone tell me how does Paste server handle concurrent requests? Or is there any document describes how does it work?


Solution

  • The answer was included in your question:

    In the official Paste Server site, it describes concurrent request is handled by Thread Pool.

    Then I assume the Paste server will create a process pool to handle all the requests.

    Don't assume process pool, documentation clearly says otherwise. ps -efL to see threads.