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@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


_______________________________________________
dev mailing list
dev@openstreetmap.org
http://lists.openstreetmap.org/listinfo/dev

Reply via email to