But we already have a unique ID in the form of
the actual server struct itself, which contains
all the data required to make a vhost "unique"
The only "issue" is what makes a host "unique"... IMO,
in an environ where the definition line of the vhost changes
between restarts is a "new" vhost and that was the assumption
that the implementation was based on.
*But that assumption can more easily be changed by providing
a work-around for that specific use case* instead of creating a
whole new Directive for a "generic" server UID which:
1. Implies that the webmaster must know when and how that UID
is used internally
2. Add more Directive cruft to an already bloated collection
of directives.
Instead, as I said, we should have a specific balancer directive
or option, complementing the Persist-related ones, that either
have the config line number included or not in the hash, ala
"IgnoreConfigFileChange" (or whatever)
> On Feb 2, 2018, at 9:52 AM, Yann Ylavic <[email protected]> wrote:
>
> On Fri, Feb 2, 2018 at 3:50 PM, Yann Ylavic <[email protected]> wrote:
>> On Fri, Feb 2, 2018 at 3:44 PM, Stefan Eissing
>> <[email protected]> wrote:
>>>
>>>
>>>> Am 02.02.2018 um 15:42 schrieb Yann Ylavic <[email protected]>:
>>>>
>>>> On Fri, Feb 2, 2018 at 3:25 PM, Plüm, Rüdiger, Vodafone Group
>>>> <[email protected]> wrote:>
>>>>>
>>>>>> -----Ursprüngliche Nachricht----- Von: Jim Jagielski
>>>>>> [mailto:[email protected]] Gesendet: Freitag, 2. Februar 2018 15:15
>>>>>> An: httpd <[email protected]> Betreff: Re: New ServerUID
>>>>>> directive
>>>>>>
>>>>>> Why? If it is designed to not change between restarts then there
>>>>>> are much easier ways to be unique, which it kinda already is,
>>>>>> considering the actual structs being used.
>>>>
>>>> I don't know what "easier ways" you are thinking about, the one
>>>> proposed here is not that complicated IMO.
>>>> In any case the method we are currently using in mod_proxy_lb *is*
>>>> changing accross restarts, mainly because of the line number.
>>>> What if you add/remove a line before the <VirtualHost>?
>>>> At least for graceful restarts, I think it shall not change, SHMs
>>>> should be reused.
>>>
>>> Is it a hash across the config record of a server what would give
>>> the desired behaviour?
>>
>> Yes, a hash using the minimal (IP[:port])* + ServerName, which is what
>> matters to select a vhost in the first place (maybe it's missing
>> ServerAlias), and what's done in this patch.
>> Should two vhosts have the same hash, only the first one will ever
>> handle requests.
>
> But I still think that the ServerUID directive is useful because the
> above are not immutable for the lifetime of a vhost either.
> That would address all needs, IMO.