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 <ylavic....@gmail.com> wrote: > > On Fri, Feb 2, 2018 at 3:50 PM, Yann Ylavic <ylavic....@gmail.com> wrote: >> On Fri, Feb 2, 2018 at 3:44 PM, Stefan Eissing >> <stefan.eiss...@greenbytes.de> wrote: >>> >>> >>>> Am 02.02.2018 um 15:42 schrieb Yann Ylavic <ylavic....@gmail.com>: >>>> >>>> On Fri, Feb 2, 2018 at 3:25 PM, Plüm, Rüdiger, Vodafone Group >>>> <ruediger.pl...@vodafone.com> wrote:> >>>>> >>>>>> -----Ursprüngliche Nachricht----- Von: Jim Jagielski >>>>>> [mailto:j...@jagunet.com] Gesendet: Freitag, 2. Februar 2018 15:15 >>>>>> An: httpd <dev@httpd.apache.org> 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.