-
Notifications
You must be signed in to change notification settings - Fork 87
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
LDStreamingMode.streaming incompatible with some Proxy servers #406
Comments
Hi @swhitty. We are currently working through some designs for supporting multiple datasources with prioritization and fallback mechanisms. We will keep your situation in mind as we work through those designs. We definitely prefer customers to use streaming, but in your situation, could you help us understand why using polling is prohibitive? Does your application get used in an environment where Proxies are more prevalent in your opinion? I don't know off the top of my head what the prevalence of Proxy usage in the iOS ecosystem is. If it is true that 2% of all global iOS users are using proxies, that is significant and we will want to dig more. |
We prefer to use streaming because it works great for 97% of our users and is highly responsive in broadcasting changes. We find that 3% of our users receive a timeout when attempting to connect Launch Darkly in streaming mode and therefore operate on cached flag values. We know that some of these users are behind a proxy server that appears to be incompatible with the Launch Darkly streaming connection. We don't want to switch every user to polling, we would like to improve the experience for these 3% of users without degrading the experience for the 97% where it works great. |
I've collected some data over the past month and 2.8% of our ~1M users have been behind a proxy server at least once. |
Thank you for that data point. |
How are you positively identifying that the customer is behind a proxy? Could you customize those customers to use polling if you can detect it beforehand as a workaround for the time being? |
We are using CFNetworkCopyProxiesForURL to detect upfront if the |
Describe the bug
LDStreamingMode.streaming
can causestart()
/setOnline(true)
to timeout behind some proxy servers.We observe that 2% of our customers appear to be behind proxy servers that cause this issue. While cached flags values are available, falling back to polling mode is more reliable for these users.
To reproduce
Add device to a network with an incompatible proxy server and attempt start in streaming mode (which is default):
Request is sent to https://clientstream.launchdarkly.com and headers are returned but no data is ever received within the body, timeout occurs and completion handler is called.
Expected behavior
It would be great to detect this and switch to polling somehow.
It's unclear how one could try with streaming then fall back to polling. Its possible to use CFNetworkCopyProxiesForURL to detect upfront if the
config.streamingURL
will be handled via a proxy, thisLogs
If applicable, add any log output related to your problem.
Library version
9.8.2
XCode and Swift version
Xcode 15.4 Swift 5.10
Platform the issue occurs on
iOS
The text was updated successfully, but these errors were encountered: