Behavior of excess requests when -Threads limit is reached - queued, dropped, or blocked?
Hello, I’m using Pode with Start-PodeServer -Threads 100. What happens when the 101st incoming request arrives while all 100 threads are busy:
- Is the request queued until a thread becomes free?
- Is it rejected/failed immediately (e.g. HTTP 503)?
- Or is it blocked/suspended until a thread is available?
@Badgerati Could you shed some light on this? :)
Hi @github-throwaway,
Apologies,
If all threads are currently processing a request, and new requests hit the server, then they will be blocked/queued until a thread is available to process the request. If the request is blocked for >30s (customisable) then the server will timeout/terminate the request and respond with an HTTP 408 status code.
Hope that helps :)
Thanks @Badgerati. Much appreciated.
How can I customize the request block time? Is that just the standard request timeout?
I created a PR to update the docs: https://github.com/Badgerati/Pode/pull/1627
Hi @github-throwaway,
Yes, it's just standard request timeout and can be configured via the server.psd1 file: https://badgerati.github.io/Pode/Tutorials/RequestLimits/#timeout
@Badgerati Thanks for clarifying. Feel free to merge my PR and close this question. :)