Document the affected running phases of configuration directive?

Gena Makhomed gmm at csdoc.com
Thu Dec 11 13:26:57 UTC 2014


On 11.12.2014 15:07, Валентин Бартенев wrote:

>> Есть лимиты на коннекты с 1 айпи, но когда вторая нода переводит весь
>> свой трафик на первую (сбой ее апача) -- ловим этот лимит. Есть идея
>> использовать realip, но непонятно, кто сработает раньше - лимит или модуль.
>
> realip сработает раньше.
>

Почему порядок работы фаз не описан в документации? Это было бы полезно.

"Implementation detail" - это означает "implementation-defined behavior"
или "unspecified behavior" и может произвольно меняться
от версии к версии?

Это примерно то же самое, что и писать арифметические выражения,
при этом не зная какой приоритет у операторов + - / * % ^ | &
потому что это "implementation detail" используемых компиляторов.

Причем в случае nginx - "скобки" полностью отсутствуют, так что явным
образом задать приоритеты работы того или иного модуля - невозможно.

-------- Forwarded Message --------
Subject: Re: Document the affected running phases of configuration 
directive?
Date: Mon, 8 Dec 2014 03:38:26 +0300
From: Maxim Dounin <mdounin at mdounin.ru>
To: nginx-devel at nginx.org

Hello!

On Fri, Dec 05, 2014 at 03:45:50PM -0800, Yichun Zhang (agentzh) wrote:

 > Hello!
 >
 > It'll be great if the official nginx documentation documents the
 > affected request running phase of each configuration directive. For
 > example, proxy_pass affects the content phase while set_real_ip_from
 > affects the post-read and pre-access phases. This can help a lot when
 > the users try to combine directives of different modules and predict
 > their relative running order. Right now we have to look into the nginx
 > internals to be sure (either source code or debugging tools like gdb
 > and systemtap).

Phases of processing is an implementation detail, and while
understanding them sometimes helps to understand what goes on in
some complex cases, it's not something to be exposed into the
documentation.

-- 
Maxim Dounin
http://nginx.org/
________________________________________________________________________

-- 
Best regards,
  Gena



Подробная информация о списке рассылки nginx-ru