Hi Baptiste, On 07/03/2016 09:09 PM, Baptiste wrote: > Hi Conrad, > > I have a few pending patches to cover this change. > Your current implementation does not cover all the cases and breaks > some implementation (when the server port is related the frontend's > port and the need for the health check port to be set). > > I'll submit my patches to Willy soon. > Part of this patch allows changing the port through the socket like you did.
this is great news, thanks! Conrad > > Baptiste > > > > On Wed, Jun 29, 2016 at 1:08 AM, Conrad Hoffmann <[email protected]> > wrote: >> Hi, >> >> Attached patch allows setting a server's port in addition to the address >> via the admin socket, e.g.: >> >> set server mybackend/server-1 addr 127.0.0.1:8080 >> >> I find this already useful by itself, and furthermore this can be used (one >> day) to update a server's address/port via DNS SRV lookups. >> >> However, the implementation has a slight problem: I tried to support the >> same port specifications as the server definition, i.e. absolute (:X), >> relative mapping (:+X, :-X) and port forwarding (omitting the port). >> On the other hand, I wanted to keep the command backwards compatible, which >> means omitting the port must not change it. Thus, I ended up with the crude >> workaround of requiring ':+65336' (== (ushort)0) to enable port forwarding, >> which is a little ugly. >> >> Nevertheless, I used this succesfully to change ports on a sever and switch >> between all modes, which is quite fancy. >> >> So I guess the questions would be: >> >> 1. interesting at all? >> 2. would maybe be an option to ditch backwards compatibility for the sake >> of a clean implementation (probably less confusing in the long run)? >> 3. or are there maybe other ideas on how to gracefully handle backwards >> compatibility? >> >> Thanks a lot, >> Conrad >> -- >> Conrad Hoffmann >> Traffic Engineer >> >> SoundCloud Ltd. | Rheinsberger Str. 76/77, 10115 Berlin, Germany >> >> Managing Director: Alexander Ljung | Incorporated in England & Wales >> with Company No. 6343600 | Local Branch Office | AG Charlottenburg | >> HRB 110657B -- Conrad Hoffmann Traffic Engineer SoundCloud Ltd. | Rheinsberger Str. 76/77, 10115 Berlin, Germany Managing Director: Alexander Ljung | Incorporated in England & Wales with Company No. 6343600 | Local Branch Office | AG Charlottenburg | HRB 110657B

