|
From: | Bob Furber |
Subject: | [libmicrohttpd] Where are http requests queued? |
Date: | Mon, 04 May 2015 16:32:07 -0700 |
User-agent: | Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.6.0 |
When I torture test my MHD server by bombarding it with xhr requests, I can only find evidence of at most 6 simultaneous MHD threads.
The MHD threads transfer their requests to a message queue (for processing by main()) and uSnooze-wait for their replies from the main() thread before proceeding to post their replies to the client. Normally, the main() thread responds as promptly as possible. But, when I put main() to sleep for a number of seconds, one would expect the MHD threads to back up and the message queue to fill up. But, the message queue never gets longer than 6 queue items waiting, whereas many 1000 requests queue up while main() sleeps and are ALL are eventually responded when main() awakes.
What is really interesting in this exercise, is that NO requests are lost while main sleeps. They are queued up elsewhere. But, where? In MHD? In the processors Ethernet chip/module? And, more importantly, where should requests best be queued? Why?
Thanks, Bob Furber
[Prev in Thread] | Current Thread | [Next in Thread] |