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

Graham Jones grahamjones139 at gmail.com
Thu Oct 27 12:08:03 BST 2011


Hi,
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....

Thanks


Graham.

-- 
Graham Jones
Hartlepool, UK.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/dev/attachments/20111027/df903176/attachment.html>


More information about the dev mailing list