Re: CFNetwork, round-robin DNS and IP failover
Re: CFNetwork, round-robin DNS and IP failover
- Subject: Re: CFNetwork, round-robin DNS and IP failover
- From: "Van Tol, Ladd" <email@hidden>
- Date: Fri, 08 Apr 2011 14:57:32 -0600
- Acceptlanguage: en-US
- Thread-topic: CFNetwork, round-robin DNS and IP failover
On Apr 6, 2011, at 11:21 PM, Josh Graessley wrote:
>> Just tried this idea, and it works fine for HTTP (and sends the right Host in a packet trace), but spits error -9807 for HTTPS, presumably because of the host name mismatch.
>
> One problem with this solution is that your software is not going to work with IPv6 where clients that do pass a host will. Your approach will work around an immediate problem, but in the long run, if the system gets smarter about how it handles this, your code will not be able to take advantage of those improvements. In a more philosophical sense, your approach is pushing less information down to the system. With less information the system can't make intelligent decisions, such as whether to prefer IPv4 of IPv6 if both are available.
This could likely be avoided by turning off the hack if IPv6 addresses come back in the response. It appears that SSL can be fixed by using kCFStreamSSLPeerName as well.
> I think there may be another problem too. If you use CFHost to resolve the name but the cellular data interface isn't up, CFHost may fail to resolve the name to an address instead of bringing up the cellular data interface to resolve the name.
Is there a convenient way to poke the network stack to get the cell data interface to come alive?
> We can't talk about future plans, but this is a problem that we are aware of. If you have access to the Lion beta, you may want to check the behavior there.
Thanks, I will check it out.
> If you can wait for this to get fixed in the OS, as the OS behavior improves, your software will too. The best way to get something fixed in the OS is to file a bug.
Happy to file bugs but currently I'm interested in getting a working solution on iOS in the next few months.
I am not averse to ripping this code out once the OS has the support. That said, we expect to support iOS 4.0 for at a year after a hypothetical iOS 5.0 might ship.
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Macnetworkprog mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden