IPv6 Patch

Tomash Brechko tomash.brechko at gmail.com
Fri Feb 1 10:25:17 UTC 2008


On Fri, Feb 01, 2008 at 01:52:10 -0800, dormando wrote:
> >There's no way for memcached to automatically distinct between private
> >and public address.  You may relay on the address class, but the truth
> >is the whole public/private stuff for IPv4 is controlled by your NAT
> >configuration.
> 
> Right, but my point is the relatively unknown behavior of 'bind by 
> hostname' by the user. They might think 'bind by local hostname' and 
> it'll _always_ bind all addresses. I'm seeing room for both, especially 
> given the portability (fears? issues?).

I'm actually a bit puzzled.  I'm one of those users, yet I don't know
what a "local hostname" thing is.  Some setups may have distinct
internal and external host names.  When there's only a single name,
then by specifying it for different servers the use takes the full
responsibility.  I doubt you will find any server out there that tries
to fight this internally, so memcached shouldn't be any smarter ;).


> Actually, it appears to be special for completely undefined reasons, 
> which bugs me for reasons only the esteemed Drepper understands. I get 
> "has the best chances to succeed" but given the constraints you're 
> establishing you have to iterate over _all_ of them _anyway_, so what's 
> the purpose in ordering it? Confusing.

The difference arise on client side: "you have to use them all" means
"don't give up after the first one".  You try to connect to one after
another, and stop once connected successfully.  This is where ordering
comes to play: more promising addresses are tried first.

For server side, either the sorting is done anyways, or perhaps the
addresses are returned in a completely random order.  In both cases,
trying only the first is meaningless.  Here you have truly try them
all, because you can't predict what address the client will use.
Recall, single physical interface may have several addresses.


> - Merge it as-is, since you can't multibind without more work anyway.

This will break IPv4 connectivity on systems that require to bind IPv6
and IPv4 separately.


> - See if we can change the unix domain socket bit to not exclude tcp and 
> udp (I can see _someone_ wanting to use all three. This whole 
> discussion's about not restricting it). I'm loathe to change a "default" 
> tho, so maybe folks have good ideas.

I think this step should be done first, i.e. to allow arbitrary number
of listening sockets of different types.


> - By "default" the ipv6 code will bind to the first address it finds.

This would be completely unjustified.  Make it the other way around,
special all-secure mode, that will bind to one first (read _random_)
address ;).


-- 
   Tomash Brechko


More information about the memcached mailing list