mixing ipv4 and ipv6 with AnyEvent::HTTP

Marc Lehmann schmorp at schmorp.de
Mon Dec 2 08:11:06 CET 2013


On Mon, Dec 02, 2013 at 08:01:23AM +0100, Raphael Geissert <geissert at debian.org> wrote:
> > > Wouldn't a connection to host A via ipv4 that is in the KA_CACHE end up
> > > being re-used if a connection to host B via ipv6 re-directed to host A?
> > 
> > Sure, but what has this to do with redirection? That happens with or
> > without redirections being followed.
> 
> That from the client application I can control whether there are connections 
> to host A via ipv4 and ipv6, but with redirections things can get mixed up 
> unless I also filter them - or set a different session id.

Again, I have to ask you why you think that - as I explained, redirections
don't handle tcp_connect differently then non-redirected requests.
tcp_connect is completely orthogonal to persistence or redirections.

I see you keep disagreeing, but keep in mind that I wrote the code, and
if it's true what you say, then you should have some evidence to back it
up (I have the code as evidence, which doesn't specialcase redirections
anywhere - maybe you trip a bug?).

> > You keep changing your problem, or what you describe as your problem.
> > That makes it a bit hard to help you.
> 
> It's still the same problem, probably not very well explained: I want to run 
> http requests to S1 hosts over ipv4 (with possible redirections and keep-
> alive/persistent connections) and requests to S2 hosts over ipv6 (with 
> redirs + ka) without things getting mixed up together and at the same time.

What are "S1 hosts"? The connection cache is (currently) per hostname, so
if "S1 hosts" are hostnames, it should just work as you want. And you can
always disable persistent conenctions as well, or do recursion yourself.

> Think about it as if the goal was to monitor the connectivity of each subset 
> of hosts over one or the other IP stack. (but the monitoring goes all the 
> way up to layer 7).

If "S1" means "hostname subset" (with emphasis on _name_) then I don't see
your problem (again, what makes you think that AnyEvent::HTTP reuses a
conenction to a different hostname?). If you actually mean "hosts", then
this is a concept outside the scope of AnyEvent (you cannot know which
host is behind an ip address, there might be multiple ones).

-- 
                The choice of a       Deliantra, the free code+content MORPG
      -----==-     _GNU_              http://www.deliantra.net
      ----==-- _       generation
      ---==---(_)__  __ ____  __      Marc Lehmann
      --==---/ / _ \/ // /\ \/ /      schmorp at schmorp.de
      -=====/_/_//_/\_,_/ /_/\_\



More information about the anyevent mailing list