[PATCH] Conditional application of limit_conn directive

turchanov at farpost.com turchanov at farpost.com
Mon Oct 12 04:10:26 UTC 2020


Hello!

Since you didn't reply to my reasoning for this patch,
I have to ask more directly.

I didn't convince you of the usefulness of this conditional mode and
you are not going to apply the patch, are you?

And if so, I could try to implement placement of the "limit_conn" into 
"if"
context (not sure that I will be able to do that but at least I can try 
to).
Will you agree to that feature?

_Any_ feedback is welcomed.

With best regards,
Sergei Turchanov.


turchanov at farpost.com писал 2020-09-23 00:39:
> Hello!
> 
> ...
> Maxim Dounin писал 2020-09-22 23:19:
>> Quoting the documentation (http://nginx.org/r/limit_conn_zone):
>> 
>> : Requests with an empty key value are not accounted.
>> 
>> That is, limit_conn can be used conditionally without any
>> code changes.  The same applies to limit_req.
> 
> Yes, I know about that feature. The problem with that approach is a
> complication of the
> process to compute the value of a "key". We tried that before (with a
> cascade of "map" directives)
> and configuration became unreadable and very hard to understand when
> you add another indirection
> level to force a "key" to be an empty value depending on another
> condition. That was an incentive
> for this patch.
> This is especially true when there are several "limit_conn" directives
> in one location
> to limit user sessions by different identification attributes (and all
> of those attirbutes
> need to be "emptied" on a condition).
> 
> With best regards,
> Sergei Turchanov.
> _______________________________________________
> nginx-devel mailing list
> nginx-devel at nginx.org
> http://mailman.nginx.org/mailman/listinfo/nginx-devel


More information about the nginx-devel mailing list