mobile/docs/root/development/performance/device_connectivity.rst
.. _dev_performance_connectivity:
Results
Envoy Mobile currently handles switching preferred networks between wifi/cellular based on reachability updates from the OS. After switching to a new preferred network, all future requests made through the library will use the new connection.
The above approach has proven successful for unary requests, but has been problematic for long-lived streams due to the fact that the library does not aggressively shut down these streams when the preferred network changes, causing them to sometimes hang until they time out.
.. note::
Issues :issue:#541 <541> and :issue:#13 <13> are being used to track the behavior of
long-lived streams, as well as using native platform sockets to alleviate the issues above.
We did not observe any issues when switching between background/foreground or between wifi/cellular.
Experimentation method
Modified versions of the "hello world" example apps were used to run the following experiments, validating that the library is able to continue making successful requests after each change.
Lifecycle experiment steps:
Network experimentation steps:
Build the library with debugging symbols (using --copt=-ggdb3)
Add the outputted Envoy.framework to the example app
In the active scheme of the app's Xcode Environment Variables, set CFNETWORK_DIAGNOSTICS=3 to enable more verbose CFNetwork logs
Set Envoy's logs to trace
Build the library
Build and run the example app:
bazel mobile-install //examples/kotlin/hello_world:hello_envoy_kt --fat_apk_cpu=armeabi-v7a
Open issues
For current issues with device conditions, please see issues with the
perf/device label <https://github.com/envoyproxy/envoy-mobile/labels/perf%2Fdevice>_.