[OSM-dev] Deploying Map Tiles on a Commercial Web Host

Nick Whitelegg Nick.Whitelegg at solent.ac.uk
Thu Oct 27 13:03:23 BST 2011

Hello Graham,

I am currently doing this, and using option one. This is probably feasible if the area you're trying to render is relatively small: I render Hampshire, Wiltshire, Surrey and West Sussex down to zoom level 14. The rendering takes an hour or two, the upload (just over 100MB) takes a little over 30 minutes. It's fairly feasible to do on a weekly basis.

Can't speak for the other two options - I don't run an always-on home server so that one's a non-starter for me. I'd guess for occasional tile rendering it would be ok.


-----Graham Jones <grahamjones139 at gmail.com> wrote: -----
To: OSM-Dev Openstreetmap <dev at openstreetmap.org>
From: Graham Jones <grahamjones139 at gmail.com>
Date: 27/10/2011 12:11PM
Subject: [OSM-dev] Deploying Map Tiles on a Commercial Web Host

I am trying to host my own map tiles 'on the cheap' using a commercial web host (rather than virtual server etc.) and am trying to decide the most efficient way of doing it, and wondered if anyone had any suggestions.   The idea is to use my home server to generate the tiles, but that is behind a slow internet connection, so is no good for serving them to the outside world (works fine in my house!).   The options I have thought of are: 
Generate the tiles on my server, and upload them to the web host via ftp - this is what I have done up to now, but it is very slow to do the initial upload.   I haven't got a clever way of updating the tiles yet either - will need to use osm2pgsql tile expiry and only upload the expired tiles.
 Generate the tiles as a large mbtiles file and upload it to the server as one big file rather than thousands of little ones - this may help the initial upload.  I am not sure how to do updates though - would need some way of uploading a mbtiles 'changeset' that can be applied to the file on the web host using php (I have php scripting on the web host)
 Set up my home server to run mod_tile, and write some sort of proxy / cache thing on the web host that takes a tile request and either serves it from its cache, or gets it from my home server if necessary after checking to see if the tile in the cache is out of date.
My feeling is that the third option is most efficient, because it will not bother uploading tiles that no-one accesses, and my server will not bother rendering them.  First use of a tile will seem sluggish though because it will use my slow broadband connection, so will  probably have it pre-load a few zoom levels.    My web host lets me run python, so I think I could run tilecache (http://tilecache.org), but I am not sure how I would deal with tile expiry then - has anyone used such a set-up successfully?   If not, I will give it a try over the next few days and see how it goes.... 



Graham Jones
Hartlepool, UK.
dev mailing list
dev at openstreetmap.org

More information about the dev mailing list