Measuring Performance
The SDK provides methods to perform a TCP Ping and extended Speedtest to measure the performance of locations.
Pinging Locations
A TCP Ping will measure the time of establishing a TCP connection to an endpoint. We are not using regular ICMP pings as these type of pings are many times blocked in several networks.
A TCP Ping only makes sense, if the user is currently not connected to the VPN, so that the ping result reflects the time it takes to send a TCP Ping packet from the user's location to the VPN server location. The SDK will prevent, that the ping method will be executed, if the user is currently connected to the VPN.

ping_locations
ping_locationsThis method will perform a single ping per instance per location and will then calculate the average ping for that location,
Parameters
subscription_id
String
ID of the subscription which has a VPN entitlement. You can obtain that subscription id as described in Obtaining a VPN Subscription ID
callback
This callback interface needs to be implemented by the app, to receive updates while the test is being conducted
Returns
Returns an array of LocationRatingResult where only the ping_rating is populated.
Speed Test
The speed test is an extended form of what the Smart Location algorithm is doing. It first pings all locations to determine the best endpoint which in the next step should be used to perform an HTTP up- and download test. Compared to the Smart Location algorithmn, it takes much more time, as the number of pings and the time to perform the up- and download is 10 seconds each. The reason for using a fixed time is, to have stable results independent of the capacity of the connection.
We suggest, to warn the user when being in a cellular network, that an extended amount of data will be up- and downloaded!
execute_speedtest
execute_speedtestThis will start a speedtest and will return, once the results have been fetched.
Parameters
subscription_id
String
ID of the subscription which has a VPN entitlement. You can obtain that subscription id as described in Obtaining a VPN Subscription ID
endpoint_selection_mode
SpeedTestEndpointSelectionMode
callback
This callback interface needs to be implemented by the app, to receive updates while the test is being conducted.
Returns
Returns an array of LocationRatingResult where only the ping_rating is populated.
Callback Notification Flow
While executing the speed test, you will encounter various callback types:
Initially, you will receive several progress types labeled
pingas the speed test identifies the optimal server. This process may take a few seconds.Once the final server instance for the speed test is selected, you will receive a progress type of
SpeedTestInstanceSelected. This notification will also provide details on Jitter, Latency, and Packet Loss as part of the results.Subsequently, you will receive multiple progress types labeled
SpeedTestDownload/SpeedTestUpload, which will inform you of the current down- or upload speed and progress.
Last updated