[Twisted-Python] Twisted HTTP client supporting failover for multiple A records?
itamar at itamarst.org
Thu Jul 15 08:55:25 EDT 2010
On Thu, 2010-07-15 at 13:33 +0100, Luke Marsden wrote:
> Thanks Itamar, this is massively useful. I'll try subclassing
> twisted.web.client.Agent to do its own DNS lookups with twisted.names so
> as to be aware of the full list of A records returned. It would then
> attempt all the IP addresses in turn until it finds one which works,
> giving up only if all the IPs yield connection errors. This should
> mirror the behaviour of the majority of web browsers "in the wild".
I suspect you can do this without subclassing... pass in IP address, and
just make sure you pass correct Host header. I forget the exact API
More information about the Twisted-Python