[Tile-serving] New option for tile server: Nginx+Tirex
kakrueger at gmail.com
Thu May 23 15:53:22 UTC 2013
On 05/23/2013 07:48 AM, Frederik Ramm wrote:
>> Thanks for powerful features of Nginx and its 3rd party modules,
>> we developed a tile server front-end on Nginx that work with
>> Tirex and PostgreSQL/PostGIS.
> Thank you, this is very interesting. I have long wanted to write a
> proper Apache module that would talk to Tirex directly rather than use
> Tirex' mod-tile socket emulation, but I'm not religious about web
> servers so if Nginx does the job, why not use that.
What's the advantage of talking to tirex directly, compared to using the
mod-tile socket emulation? What should mod_tile be able to do, that it
currently can't with the emulation layer?
I have been thinking about extending the mod_tile / renderd protocol to
better support multi-lingual maps by adding a "parameter" variable to
the protocol. I.e. one could for example then specify the base map-style
and pass in a parameter in which language to render the text. I also
planned to add a mime type, so that one can for example support both png
If there are other additions that one needs in the protocol between tile
server and rendering daemon, then that could probably be roled into that
change as well. It would be good to not change the protocol too often
though, to ensure backwards and forwards compatibility, so that one can
mix and match tile servers and rendering daemons as one can now with
tirex and renderd.
If the tirex protocol already provides those features, then it likely
wouldn't be difficult to extend mod_tile to support that as well (you
don't need to write a whole new module to add a feature... ;-)) Mod_tile
already supports using either unix domain sockets or TCP/IP sockets to
connect to the rendering backend.
> It will be interesting to see whether the lua code can match the
> C-based mod_tile in terms of throughput on a high-traffic system.
My guess would be that unless you are google or perhaps mapbox or
mapquest, the speed of the tile server code doesn't matter too much. The
limiting factor is likely the disk system of retrieving the tiles
anyway, not the code.
> Good job!
More information about the Tile-serving