From OpenStreetMap Wiki
Jump to: navigation, search
Available languages — Tirex/Multihost
Afrikaans Alemannisch aragonés asturianu azərbaycanca Bahasa Indonesia Bahasa Melayu Bân-lâm-gú Basa Jawa Baso Minangkabau bosanski brezhoneg català čeština dansk Deutsch eesti English español Esperanto estremeñu euskara français Frysk Gaeilge Gàidhlig galego Hausa hrvatski Igbo interlingua Interlingue isiXhosa isiZulu íslenska italiano Kiswahili Kreyòl ayisyen kréyòl gwadloupéyen kurdî latviešu Lëtzebuergesch lietuvių magyar Malagasy Malti Nederlands Nedersaksies norsk norsk nynorsk occitan Oromoo oʻzbekcha/ўзбекча Plattdüütsch polski português português do Brasil română shqip slovenčina slovenščina Soomaaliga suomi svenska Tiếng Việt Türkçe Vahcuengh vèneto Wolof Yorùbá Zazaki српски / srpski беларуская български қазақша македонски монгол русский тоҷикӣ українська Ελληνικά Հայերեն ქართული नेपाली मराठी हिन्दी অসমীয়া বাংলা ਪੰਜਾਬੀ ગુજરાતી ଓଡ଼ିଆ தமிழ் తెలుగు ಕನ್ನಡ മലയാളം සිංහල ไทย မြန်မာဘာသာ ລາວ ភាសាខ្មែរ ⵜⴰⵎⴰⵣⵉⵖⵜ አማርኛ 한국어 日本語 中文(简体)‎ 吴语 粵語 中文(繁體)‎ ייִדיש עברית اردو العربية پښتو سنڌي فارسی ދިވެހިބަސް

Tirex is designed to run on a single host only. This made the design easier and should be enough in most cases. If one host is not enough for your needs there are several strategies possible.

Use a caching proxy in front of Tirex

You can use a caching http proxy such as Squid in front of your tile server. This can take some of the load of the tile server.

Separate database derver

Typically you need a large database for your map data that is accessed from the Mapnik rendering backend. You can install this database on a different host, taking part of the load off your tile server. But be aware that on a typical OSM tile server huge amounts of data flow between the database and the renderer, so you need a fast network connection between the two hosts.

If you run a setup like this, you might want to look at the PgBouncer, a lightweight PostgreSQL proxy [1].

Splitting the map

You can use a load balancer or special Javascript code in your OpenLayers map to direct tile requests for different tiles to different servers. This way the load is distributed. Its reasonably easy to do this according to the map and/or zoom level. If you want to split according to the X and Y coordinates, remember that tile rendering and caching is done in metatiles.

Using Tirex syncd

Tirex comes with a daemon called tirex-syncd. If configured properly, it will run in the background on your tile server and gets notified by the master whenever a metatile was newly rendered. It will then copy this metatile to another host. This can be used to have a backup host in case your primary host fails.

See the Config options in the mail file starting with sync for the configuration needed.

Future developments

In the future Tirex might be changed to directly support multiple hosts, but there are no concrete plans yet.