-1

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?

temoto
  • 5,394
  • 3
  • 34
  • 50
Bai Bing
  • 381
  • 2
  • 15

1 Answers1

1

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.

Community
  • 1
  • 1
temoto
  • 5,394
  • 3
  • 34
  • 50
  • Thanks a lot temoto! I thought that Python does not support multi-thread because of the Global Interpreter Lock. So when I see multi-threading my mind automatically translated it to multi-processing :(. Now I understand multi-threading could be useful in heavy IO situation that's why Paste implemented this multi-threading module. Thanks a lot! – Bai Bing May 13 '17 at 12:25