--- title: Speed Up Slow Downloads on iOS with a Proxy or CDN extra: Using a proxy or CDN can dramatically improve download speeds on an iOS device. kind: article section: technical created_at: 2013-01-13 12:39:00 keywords: - ios - proxy - slow - download - podcast - squid - launchd - cdn --- Whilst developing the [Radiopaedia iOS app][radiopaedia-app] I ran into the problem of very slow download speeds within the app. The app has packs of content available for purchase and download. The download speed was fine in the simulator but on the device it was painfully slow1. Both the Mac running the simulator and device were connected to the same Wi-Fi network. Profiling the code didn't reveal any issues either. [radiopaedia-app]: http://radiopaedia.org/articles/radiopaedia-ios-radiology-app Some searching revealed people complaining about YouTube videos downloading faster over 3G than Wi-Fi. There were a number of theories and proposed fixes, including [people seeing faster rates when downgrading their access point to 802.11b][80211b]2 but I found one particular article (that I can no longer find) that said the power management in the iOS Wi-Fi stack interfered with download speeds when communicating to a high latency destination over a high speed Wi-Fi connection. For example YouTube servers in the US from AU3. [80211b]: http://web.archive.org/web/20120511020134/http://qelix.com/blog/2008/08/31/get-better-wifi-speeds-on-iphone-3g With this in mind I tested hosting the content packs on an Australian server, instead of in Amazon S3 accessed via CloudFront. This showed a huge improvement in download speed. At the time CloudFront didn't have an Australian presence so we switched to hosting the packs on RackSpace's CloudFiles, which uses the much more extensive Akamai CDN and ensured that users of the app would have the best possible download speeds no matter where they were.