[OSM-dev] What can we do to get a tile.openstreetmap.org contributable CDN within a month?

yvecai yvecai at gmail.com
Thu Jan 5 20:30:52 GMT 2012


A bit of apache config to contribute.
At OsmAnd, we started building a tile server, however it is not very 
powerfull, and is pre-rendered up to zoom 13 only. Thus we are making 
some attempts to have a load balancer on another server, it look like this:

<VirtualHost *:80>
     ServerAdmin webmaster at localhost
     ServerName loadbalancer.osmand.net
<Proxy *>
      Order allow,deny
      Allow from all
</Proxy>
<Proxy balancer://hotcluster failonstatus=404>
      BalancerMember http://tileserver.osmand.net status=+I
      BalancerMember http://tile.openstreetmap.org status=+H
</Proxy>
     ProxyPass / balancer://hotcluster/

     LogLevel warn
     LogFormat "%h %l %u %t \"%r\" %>s %b \"%{X-Forwarded-Server}i\" 
\"%{Referer}i\" \"%{User-Agent}i\" duration:%T/%D io:%$
     CustomLog ${APACHE_LOG_DIR}/access.log lb

</VirtualHost>

When a tile is requested to loadbalancer.osmand.net, it is proxied to 
tileserver.osmand.net.
On this tile server, mod_tile will return a 404 if the requested tile is 
not available after 5 seconds. After this 404, then 
loadbalancer.osmand.net request the tile to tile.openstreetmap.org until 
tileserver.osmand.net is back.

Any comment, flaws detected or hints highly appreciated.

Yves




More information about the dev mailing list