Hi Anthony,

it seems I forgot about this thread, being sidetracked on other stuff...

On Wed, Feb 21, 2024 at 04:41:04PM -0500, Anthony Deschamps wrote:
> Hi Willy,
> 
> I wonder if I could accomplish what I'm looking to do by changing the
> behaviour of "maxqueue" (without making a breaking change, ideally).
> Currently, "maxqueue 0" is interpreted as "unlimited". However, the system
> I'm working with has long-running WebSocket connections, so a queued
> request is likely to sit in the queue for too long.
> 
> Is there a way to configure "maxqueue 0" for real? If not, then perhaps
> that's a patch I should make first, and then come back to this one. Since
> "maxqueue 0" already means "unlimited", maybe a "no-queue" option
> would be best in order to avoid making a breaking change.

Oh, sadly I didn't remember that maxqueue 0 was unlimited. Indeed, that's
annoying because I do see the value in totally preventing the queue from
being used. I guess we copied that from maxconn and other limits to
preserve the same logic of 0=unlimited. But that wasn't very wise for
this specific one :-/

Maybe (big maybe) we could change the default value to -1 for unlimited
as a few other settings have, and permit value zero to be used. The
problem I'm having with this is for APIs and those who automate their
config generation, and who might possibly already emit "maxqueue 0" to
make it infinite. In addition, the maxqueue feature was introduced 16
years ago in 1.3.14 by commit acafc5f88 ("[MEDIUM] add support for
"maxqueue" to limit server queue overload"), and documented a few
months later in 1.3.15 by commit 198a744e1 ("[DOC] all server parameters
have been documented"), so the risk is not that minimal.

I'm CCing Marko who develops the Dataplane API. This should be very
representative of how such values could be interpreted. Marko, do you
know if the dpapi ever emits "maxqueue 0" or makes a special case of
it when it finds it in a config ? Here the problem is that a poor
historical choice prevents one from saying that we don't want to queue
at all on a server.

I'd like to hear about others here on the list regarding this. If there's
a general consensus that it's mostly harmless to change the infinite from
0 to -1 and permit 0 to be used, we could do it and put it in the release
notes. Otherwise we'll need to find another solution (maybe an extra
keyword to disable any queuing).

Thanks!
willy

Reply via email to