Is there a specific problem you are trying to solve by wanting to override how 
it works?

There is no scheduler to speak of that you can override.

What happens is that each of the daemon process when using daemon mode uses a 
cross process mutex lock on being able to accept the next connection. A process 
will only attempt to acquire the cross process mutex lock if they have a spare 
thread available ready to handle a request.

This mechanism ensures you don't end up with the greedy acceptor problem where 
a process accepts connections it isn't in a position to handle immediately, but 
also avoids the thundering heard problem.

Since the cross process mutex lock only comes into play for the accept phase of 
a handling the connection and is then released, even though that same process 
may still have idle threads in its thread pool, it is more likely that a 
different process which is more ready gets the lock the next time. The result 
of this is that acceptance of requests should be relatively balanced across the 
processes.

That you are even asking suggests you think you have a problem where you need 
more control. If your overall application handles various workloads (via 
request handlers), there are perhaps better ways of dealing with it by 
partitioning the URL namespace and directing requests to different daemon 
process groups, each configured differently for that subset of requests 
directed to it.

So as already asked, if you can explain what the problem is that you think you 
have, I can perhaps suggest more appropriate ways of dealing with it.

Graham

> On 17 May 2021, at 10:02 pm, 龍世豪 <[email protected]> wrote:
> 
> Dear Dumpleton,
> 
> I have some questions about mod_wsgi. Could you help me to understand the 
> concept of the module, thanks!
> 
> I enable the multiple process (five processes) to run the WSGI application. 
> When it receives an HTTP request then a process will execute the application. 
> Which process scheduler (e.g. round-robin, FIFO, ...) is used, and how the  
> mod_wsgi choose the next process? And can I change the process scheduler by 
> configuration?
> 
> Best wishes,
> Howie
> 
> -- 
> You received this message because you are subscribed to the Google Groups 
> "modwsgi" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to [email protected] 
> <mailto:[email protected]>.
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/modwsgi/CADWas%3DgSFgfsnnSq7fCUeg-wjb%3D1RiWD0Nknyapm1Wb2AquFHw%40mail.gmail.com
>  
> <https://groups.google.com/d/msgid/modwsgi/CADWas%3DgSFgfsnnSq7fCUeg-wjb%3D1RiWD0Nknyapm1Wb2AquFHw%40mail.gmail.com?utm_medium=email&utm_source=footer>.

-- 
You received this message because you are subscribed to the Google Groups 
"modwsgi" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/modwsgi/269A770A-7394-4C97-AE38-E8DCED1E2488%40gmail.com.

Reply via email to