[Tilesathome] Proposal: New T at H Server structure
spaetz
osm at sspaeth.de
Sun Jun 1 16:19:37 BST 2008
On Sun, Jun 01, 2008 at 10:00:22AM +0200, Gerhard Schmidt wrote:
> i have done quite some thinking lately how to speed up the tiles at home
> upload. I've come up with an complete new structure of the server System.
Great to hear that you want to improve the t at h server. I'll add comments below, to sum it up, I think your redesign is a little overengineered.
> 1. Database (MySQL)
> 2. Reflector (Apache or squid)
> 3. TileServer (plain apache)
> One of the Reflector server (choose per round robin or by some
> intelligent code in the OSM Javascript code) gets the request looks the
> tile up in the Database and returns the location of the tile via
> redirect the the client who connects to the indicated TileServer and
> gets the Tile there.
Why would you want to have several Refelctor servers that would need to look up a central mySQL database (and if you have distributed mySQLs, you would need to synchronize all of them on each upload)? And why issue a redirect that the browser needs to follow for each single tile? That sounds horribly complex and slow.
If you want to make it distributed in some way, the first suggestion I would make is to simply have a separate tile server for each layer. Currently we have:
"tile" (regular), "maplint", "lowzoom", and "caption" (currently only -en, potentially many more). If you simply had one server responsible for one (or a few) layers, you could easily distribute the upload-load between 2-4 servers.
One of the current beauties of the t at h server is that usually a tile is being served as one single file system look up, no database or php involved. I just checked the apache log, today from 07:41 - 08:19 we served 125366 tiles (just viewing), while we had 3198 "/Upload/" requests. So keeping viewing as cheap as possible should be a priority.
I don't want to discourage you from writing a completely decentralized tile server, but splitting layers among servers sounds much easier to me. Plus, OSM doesn't have a few dozen servers in the attic that could be used for all this, so besides coding you would also find people who run "deflectors", "mysqls", and "tah servers". IMHO too much complexity for what is required.
spaetz
More information about the Tilesathome
mailing list