[ka-Map-users] Mapserver Throtteling

Stephen Woodbridge woodbri at swoodbridge.com
Mon Nov 13 23:26:00 EST 2006


Andrew Hughes wrote:
> Hey Again,
> 
> I will most likely do this myself and attempt to contribute back, but 
> first with the explaination.
> 
> It is nice to see that in KA-Map that a Lock file is written to prevent 
> simultaneous identical* tile requests (*or same meta tile). The 
> principal of a simple lock file could also be used to throttle 
> concurrent non-unique tile requests. I have experienced problems 
> (particularly cascading to another server) where flooding the server 
> trashes the cache and the client experience because of excessive load. 
> Throttling the mapserver access to say X many concurrent requests would 
> ensure quality of service to at least some users and would protect the 
> cache integrity. Users that find themselves on an overloaded server 
> could be given a tile with a polite message (and the browser told not to 
> cache the image).
> 
> I also modified the "tile.php" to be a "readonly" server that provides a 
> polite message... something that was very easy. This is much the same as 
> above (without the throttle).
> 
> 
> Comments?

I would look at apache connection throttling and adding additional tile 
servers. If you have multiple tile servers accessing a back end SAN or 
NAS device, then you need to check if the tile.php code is really 
locking. You should never get trashed tiles if it is working. The file 
locking might not work over networked file systems unless this are setup 
correctly to support networked file locking. If the networked file 
system needs a special file locking protocol then you may need to modify 
the locking in tile.php to support that protocol.

-Steve


More information about the ka-Map-users mailing list