What is avg. optimal connection timeout for mobile app?

android, ios, timeout

Solution

You will hopefully get better answers, but from personal experience I can talk about the user side of things. If I open an app that requires a data connection, such as my web browser or a social client, I want it to timeout in under 5 seconds, because it shouldn't take a long time to determine if I actually have a connection or not.

It is possible to look at it from a device standpoint, but that's highly variable (wifi vs. 3G, specific network chip, OS, data connection currently active, etc.) whereas user requirement are probably the most important factor. You could get away with like 30 seconds if the data connection isn't necessarily critical for the application, but the major point is that the technological limitation is only a part of how long you should budget for a connection timeout.

Problem

This question is about trying to find a scientifically or statistically defensible rationale for choosing a timeout. I mean every app must do this, but what is the optimal timeout? We need more people to answer or comment. +3, +4 does not mean the question is solved. An important question deserves more answers. We can all benefit from this knowledge. Basically trying to compare: ``` a short timeout of say 20 seconds, but two connection attempts are made ``` vs ``` one long connection attempt of say 40 or 60 seconds. ``` Which has the best chance of establishing a connection? We need hard facts. So far the numbers I am getting are all over the place 10s, 42, 60s. But what is really optimal? Now of course after 5-10 seconds the user should be informed of a problem either way, but whats the best effort approach for establishing a connection. Note: I am aware that there are many factors, but as app developers we can't always get permission to examine wifi signal situation etc. Still there must be some rational answer of what is best on average.

Original source