iPhone Distributed Computing Fallacy #3: bandwidth is infinite

Posted on by in Development

Reviewing the 8 classic “fallacies of distributed computing” and how we can avoid them when writing iOS applications.

The fallacies of distributed computing

  1. The network is reliable.
  2. Latency is zero.
  3. Bandwidth is infinite.
  4. The network is secure.
  5. Topology doesn’t change.
  6. There is one administrator.
  7. Transport cost is zero.
  8. The network is homogeneous.


Fallacy #3: “bandwidth is infinite”.

Bandwidth is not unlimited and it is not free, this has implications beyond “downloading lots of data takes longer”.

  1. Apps over 20MB cannot be downloaded over cellular networks: see the App store approval guidelines.
  2. If your app delivers video over cellular networks, and the video exceeds either 10 minutes duration or 5 MB of data in a five minute period, you are required to use HTTP Live Streaming. (Progressive download may be used for smaller clips.)

    If your app uses HTTP Live Streaming over cellular networks, you are required to provide at least one stream at 64 Kbps or lower bandwidth (the low-bandwidth stream may be audio-only or audio with a still image).

    From the Streaming Media Guide.

  3. Audio streaming content over a cellular network may not use more than 5MB over 5 minutes

    From the App store approval guidelines.

Many users do not have unlimited data plans so your app’s total bandwidth use while on a mobile network may be a concern.

Since the network is not reliable large requests, which take longer to complete, are sometimes going to fail as a network connection is interrupted. If your app cannot resume those connections you risk always transferring the first 80% of the data, losing the connection, and starting again from the beginning.

Users are also unreliable; they will close or background the app while you are trying to transfer data for them.

Testing bandwidth
I use Charles to throttle network bandwith to test apps using low bandwith connections during development.
The Settings app provides an easy tool for measuring cellular bandwidth use if your app behaves differently while using the WWAN; look in Settings -> General -> Usage.