On 07/17/2015 10:37 PM, Baptiste wrote:
>> First would be resolution of SRV records and actually using the port
>> supplied by the SRV record as the port for the server. I looked at the code
>> and it doesn't seem like too much work, most of it would probably be
>> changing the config stuff accordingly.
> 
> You're right, this could be an interesting option.
> Actually, we though about the SRV records to populate a full backend
> server list with IP, name, port, weight using a single DNS query.

Awesome! That's exactly what I want :)
It's what I tried to express in the second part of my request, probably in
a slightly weird way.

>> The other one is... well you asked for it ;) so here it goes: it would be
>> great to express in the config something like "resolve this name and use up
>> to X servers from the reply". The backend then allocates X servers.
>> Assuming that the initial lookup returns Y results, the (sorted) records
>> get assinged to the first Y servers, the other X-Y servers get marked as
>> down. Upon a new lookup, same procedure for a potentially changing value of 
>> Y.
>> I realize this a pretty bold feature request for several reasons, but I
>> have actually spent some thought on it think it might be doable without
>> really violating any of HAProxy's design paradigms. I would also be willing
>> to invest some time (code) into this myself.
>> If you think this might be at least worth a discussion, I'd be happy to
>> share some more detailed thoughts and it would be great to hear your
>> thoughts on that, too.
> 
> First, there are some limitations about creating servers on the fly in
> a backend.
> So instead, we propose you to pre-allocate servers by configuration
> and then wait for the DNS to populate it.

It's kind of what I meant, although I had something in mind where you say
once "preallocate 20 servers for this backend" instead of listing 20
servers with the same hostname. But that's syntactic sugar and I would
happily use the solution listing a server for each desired allocation.

> I don't speak about a request per server, I speak here about one
> request for the whole farm :)

Again, awesome! That's what I'm looking for!

> You go one step further than the design we have about SRV records to
> populate the backend.
> We thought using priority to decide whether a server is active or backup.
> The advantage is that you don't need to reload HAProxy to change your X value 
> ;)

Yes, perfect. And, what I tried to express above, HAProxy should mark some
servers down if the number records received is less than the number of
servers configured.

> I would welcome a contribution about SRV record type.
> That said, before this, I have to rewrite part of the response parser
> to store the response in a real DNS packet structure instead of
> keeping data in a buffer.

Sounds good. I am not sure what you have in mind there or what parts of the
code would be touched by that, so if you let me know when it's done I'll
happily send some patches as a base for further discussion!

Thanks, Baptiste, this get's me even more excited about HAProxy than I am
already :)

Cheers,
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

Reply via email to