Welcome! Log In Create A New Profile

Advanced

Re: [PATCH] The "sort=" parameter of the "resolver" directive

Sergey Kandaurov
June 30, 2022 12:18PM
> On 29 Jun 2022, at 04:51, Maxim Dounin <mdounin@mdounin.ru> wrote:
>
> Hello!
>
> On Tue, Jun 28, 2022 at 04:24:58PM +0400, Roman Arutyunyan wrote:
>
>> On Thu, Jun 16, 2022 at 07:17:13PM +0400, Sergey Kandaurov wrote:
>>>
>>>> On 23 Feb 2022, at 08:11, Ruslan Ermilov <ru@nginx.com> wrote:
>>>>
>>>> src/core/ngx_resolver.c | 38 +++++++++++++++++++++++++++++++++++++-
>>>> src/core/ngx_resolver.h | 5 +++++
>>>> 2 files changed, 42 insertions(+), 1 deletions(-)
>>>>
>>>>
>>>> # HG changeset patch
>>>> # User Ruslan Ermilov <ru@nginx.com>
>>>> # Date 1645589387 -10800
>>>> # Wed Feb 23 07:09:47 2022 +0300
>>>> # Node ID 8db4bbd67840e8bebb23f9c6d10c0f633552e616
>>>> # Parent 1c19779448db2309d607c74e2628ff98f84569ff
>>>> The "sort=" parameter of the "resolver" directive.
>>>>
>>>
>>> IMHO, the name isn't enough self-documenting in this context.
>>> It can be misinterpreted as sorting addresses, not families.
>>> I'd prefer the parameter name "prefer" here.
>>
>> Jftr, we had a discussion about this. I like the new name. There's no
>> sorting here.
>
> IIRC, the "sort=" option was expected to be a simplified version
> of the sortlist option of resolv.conf. It was intentionally made
> extendable, so potentially we can support all the sortlist
> features if needed. Ruslan might remember details, make sure to
> discuss this with him.

As discussed with Ruslan, and if I got him right, the "sort" name has
a weak relation to sortlist, the intension is to sort address families,
including future ones (which is rather theoretical).
In principle, the syntax can be extended to arbitrary address prefixes.
As additionally discussed, sortlist is substituted with precedence based
lookup table in RFC 3484 (now RFC 6724) for default address selection.
In gethostbyname() sortlist is used for query type A only, and in
getaddrinfo() it is the same limitation "for backward compatibility
against gethostbyname(3)". On the other hand, address selection policy
based reordering is applied for all address families in getaddrinfo().
(This is based on my research of KAME/BSD sources.)
The "prefer" name is actually inspired by RFC 3484 and related terminology.

--
Sergey Kandaurov

_______________________________________________
nginx-devel mailing list -- nginx-devel@nginx.org
To unsubscribe send an email to nginx-devel-leave@nginx.org
Subject Author Views Posted

[PATCH] Add ipv4=off option in resolver like ipv6=off (ticket #1330)

Lukas Lihotzki via nginx-devel 1061 January 19, 2022 01:50PM

Re: [PATCH] Add ipv4=off option in resolver like ipv6=off (ticket #1330)

ru@nginx.com 467 February 16, 2022 07:32AM

Re: [PATCH] Add ipv4=off option in resolver like ipv6=off (ticket #1330)

ru@nginx.com 369 February 22, 2022 11:10PM

Re: [PATCH] Add ipv4=off option in resolver like ipv6=off (ticket #1330)

Lukas Lihotzki via nginx-devel 212 May 28, 2022 12:30PM

Re: [PATCH] Add ipv4=off option in resolver like ipv6=off (ticket #1330)

Sergey Kandaurov 236 June 15, 2022 06:28AM

Re: [PATCH] Add ipv4=off option in resolver like ipv6=off (ticket #1330)

Roman Arutyunyan 170 June 28, 2022 08:12AM

Re: [PATCH] The "sort=" parameter of the "resolver" directive

Sergey Kandaurov 186 June 16, 2022 11:18AM

Re: [PATCH] The "sort=" parameter of the "resolver" directive

Roman Arutyunyan 167 June 28, 2022 08:26AM

Re: [PATCH] The "sort=" parameter of the "resolver" directive

Sergey Kandaurov 179 June 28, 2022 12:02PM

Re: [PATCH] The "sort=" parameter of the "resolver" directive

Maxim Dounin 184 June 28, 2022 08:52PM

Re: [PATCH] The "sort=" parameter of the "resolver" directive

Sergey Kandaurov 212 June 30, 2022 12:18PM



Sorry, you do not have permission to post/reply in this forum.

Online Users

Guests: 299
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready