This is a static archive of our old OpenStreetMap Help Site. Please post any new questions and answers at community.osm.org.

Should I run my tile server on a separate server or the same server as my primary app?

0

I am switching to OSM and will be hosting my own tile server. Some information about my tile server:

  • Covering only the southern part of Ontario. Bottom left position = {lat: 41.9, lng: -83.2}. Top right position = {lat: 47, lng: -74.2}
  • Retina tiles (512 x 512)
  • One style only (slightly modified version of OSM Bright)
  • Max zoom 18. Minimum zoom 10. All tiles from zoom 10 - 18 will be pre-rendered

The last design decision I need to make is where I should set up my tile server:

  1. On the same server as my primary application
  2. On a separate server

There are advantages and disadvantages to both. What is the conventional wisdom on this?

asked 19 Mar '19, 19:24

valachio's gravatar image

valachio
418913
accept rate: 0%

edited 19 Mar '19, 19:25


One Answer:

2

Pre-render your tiles on some cloud machine that you boot up just for the purpose, and then kill again. Transfer rendered tiles to your primary server and have them served by the local web server. This is provided you can do with something like weekly updates.

answered 19 Mar '19, 20:17

Frederik%20Ramm's gravatar image

Frederik Ramm ♦
82.5k927201273
accept rate: 23%

I need the tile server to be up for real-time rendering as well, for the extreme case that a user needs to render tiles outside my pre-defined area.

(19 Mar '19, 23:13) valachio

Does that mean you want to have a world-wide database ready? Or just "all of Ontario" or "all of Canada" or...?

(19 Mar '19, 23:58) Frederik Ramm ♦

All of Ontario. I will be pre-rendering the southern part of Ontario (satisfies 99.9% of users). But some users may want to check out areas in Northern Ontario. I want the server to be ready to render those tiles if necessary.

(20 Mar '19, 00:09) valachio
1

In that case, if your primary server has (or can be made to have) the necessary SSD capacity for the database and the other tasks running there do not compete too much with updates and pre-rendering, I'd install everything on one server for simplicity.

(20 Mar '19, 00:18) Frederik Ramm ♦

Thank you for your advice

(20 Mar '19, 02:01) valachio

Source code available on GitHub .