The landmines of maps serving

I was intrigued by Apple's announcement that it was moving away from Google Maps to its own mapping solution in iOS6. This is a serious step up for Apple. If you do the math that shows that a basic 256-color map view on a 640x960 screen is 610KB, you're looking at having to provision over half a MB of serving capacity for each map query per second. Look at what Apple high-bandwidth content that Apple serves currently: OS updates (say, 100MB/user/week, but really cacheable) and iTunes streaming and sales (say, 2 songs at 5MB per user per week). I can well imagine Apple Maps tripling their traffic levels, which is significant enough, but the other point is that maps data is very user-sensitive in the way that even iTunes sales are not: a delay of 30s in a 1 minute download of a music track is annoying, but delaying interactive map views by 10s will really bug people trying to find their way around a new city.

I foresee a lot of pain for Apple's data centre team in the first month or two after iOS 6 rolls out, and not a little user annoyance.

Update: (20/6/12) as the esteemed Mr. Worstall has linked this, I shall expand on the detail a little. Yes, if you compress the image (e.g. via PNG) you could easily shrink the bandwidth required to 1/2 or 1/3 of the uncompressed, depending on how "busy" the map image is. However, nothing is for free. If you want to serve compressed images, you either have to pre-compute and compress every image you might possibly want to serve (which can turn out to be a big, big storage problem when you consider different zoom levels and image viewing options) or you have to compress on the fly and hope that you get reasonable cache hits. The former strategy takes stupid amounts of disk (which is slow to read); the latter takes stupid amounts of processing power and therefore reduces the number of users that each server in your datacenter can serve.

Compared to this, serving iTunes tracks is easy because everyone gets the same track data and caching the popular tracks (Justin Bieber, Katy Perry, Flanders and Swan) helps you avoid the slow disk reads.


  1. a basic 256-color map view on a 640x960 screen is is more like 150k to 200KB!

  2. If you compress it, sure. Depends on what tradeoff you want to make on bandwidth vs client decompression work.


All comments are subject to retrospective moderation. I will only reject spam, gratuitous abuse, and wilful stupidity.