Finally, I found a solution and it works great.
I put a small static file, for example https://www.google.com/images/icons/product/chrome-48.png , on each server, then upload the file from each server and calculate the time spent ( Calculation of connection / download speed - nice way to calculate speed thanks to @Antonio MG) and then save the fastest server with NSUserDefaults
. Before downloading the application from the server, replace the request url node with the fastest host.
When the application is running or applicationWillEnterForeground:
perform a network speed check. Now, every time you download the application, the fastest server that has just been calculated is loaded.
Hope this helps those who need it.
source share