Commit Graph

427 Commits

Author SHA1 Message Date
e541c64a8b [mod_tile] Add a bunch of heuristics to determin the cache expiry of tiles
Achieving a high cache hit ratio is both beneficial to clients and the server. For the clients it is
reduced loading time and for the server reduced resources used. To achieve this, cache expiries should be set
as long as possible. However, this conflicts with wanting up to date tiles, especially with minutely renderings.
As you can't predict the future, one can only use a bunch of heuristics.

With this patch, the tile expiry heuristic is based on three factors. The frequency of planet updates (the heuristic used so far),
the zoom level and the last modified time. The idea behind the zoom level heuristic is that low zoom tiles don't change noticably
very often, and so can use longer cache expiries than high zoom tiles. The last modified heuristic is based on the assumption
that a tile that hasn't changed for a while is more likely to stay unchanged than one that has recently been modified.

The heuristics have a bunch of tunables that can be set in the apache config of mod_tile
2009-06-10 22:14:58 +00:00
c95fdb710f [renderd] Add the ability to explicitly expire renderd tiles from proxys via HTCP
For large setups of mod_tile, and renderd, it may be beneficial to have a reverse proxy infront of the main tile server.
However when using a fast updating db e.g. running off the minutly diffs, the proxy may either deliver stale content, or the
cache expiry has to be set very short, which limits the effectiveness of the proxy. Instead, this patch adds an explicit
mechanism to renderd to signal to the proxy which tiles have been rerendered and thus should be discarded from the cache.
2009-06-10 19:16:53 +00:00
fc9e2e55a2 Debian build fixes 2009-06-10 16:28:07 +00:00
29080ad2ec More changes to make the tile cache directory configurable at runtime
* -t|--tile-dir option for render_list and convert_meta
* renderd reads it from renderd.conf section "[renderd]" setting "tile_dir"
* mod_tile reads from Apache conf ModTileTileDir directive
There are still some places in store.c left, where HASH_DIR is used directly. More fixes needed.
2009-06-10 16:26:12 +00:00
fb751bf8d4 Make tile directory prefix configurable at runtime
Changed -l|--layer to -m|--map because we are talking here about whole maps, not only layers
2009-06-10 15:48:00 +00:00
753f9e11db Added --min/max-x/y options to restrict tile range when using --all 2009-06-10 13:25:18 +00:00
7fb1c6a7ba Added --socket command line option to render_list and render_old (unix domain socket to connect to renderd)
Added --map command line option to render_list (name of map config instead of "default")
Added --all command line option to render_list (render all tiles in given zoom levels instead of reading from stdin)
2009-06-10 12:07:10 +00:00
3b36763f54 recursively make iniparser 2009-06-10 10:23:53 +00:00
b900cd0e65 do not also build iniparser... 2009-06-10 10:23:09 +00:00
a4c5781a7f fixes for debian build 2009-06-10 10:10:47 +00:00
5c1020664e also build iniparser 2009-06-10 10:01:39 +00:00
e32655ecfc + changelog for mod_tile 0.1 2009-06-10 09:53:54 +00:00
ed0bd0f71f renderd uses syslog now instead of logging messages to stderr
renderd has -c, --config option to set config file at runtime
2009-06-09 16:22:28 +00:00
875a253533 Renderd uses iniparser3.0b ini file parser now which is included
Made renderd more configurable at runtime: socketname, num_threads and the mapnik settings plugins_dir, font_dir, and font_dir_recurse are now available through renderd.conf
    There should be only one incompatible change: the [Default] section in the config is now in all lowercase "[default]" because the parser lib gives section and key names back in lowercase
2009-06-09 15:34:15 +00:00
97bb219763 Updated Debian package files to include init script 2009-06-09 13:10:23 +00:00
3b1ad8432f - Added Apache config options for MAX_LOAD_OLD, MAX_LOAD_MISSING and REQUEST_TIMEOUT, defined in C code are only default values now
- Preparation for adding minzoom and maxzoom to config
2009-06-04 16:09:02 +00:00
6179355a4e issue proper error message if neither apxs nor apxs2 present for mod_tile 2009-06-04 16:04:58 +00:00
cf634d2ba6 simple debian package builds for mod_tile and renderd 2009-06-04 15:54:11 +00:00
a4e125af5e mod_tile makefile to use apxs2 automatically when apxs not available 2009-06-04 14:25:51 +00:00
368ab1c2e8 fix convert_meta utility to work with multiple layers 2009-05-01 18:21:14 +00:00
5d2f8cd0c8 mod_tile: Remove unnecessary inclusion of freetype and libagg 2009-02-07 18:08:23 +00:00
098276b83e Improve efficiency by using map.buffer instead of implementing our own rendering gutter. Avoid saving intermediate png files during rendering (This requires mapnik svn >= r814). Determine map projection from <Map> object instead of hard coding. Partial re-write of meta-tile code to C++. 2009-01-20 00:35:26 +00:00
01bbb97b9d Fix protocol version in mod_tipe speedtest.cpp 2009-01-20 00:30:44 +00:00
159ca94603 renderd.py: Obtain map projection string automatically from <Map>. Add some more comments. Minor code tidy up 2009-01-20 00:20:16 +00:00
bb21b80d0a Fix warning message from renderd.py caused by re-using a single ProtocolPacket for multiple requests 2009-01-19 02:08:04 +00:00
9a9b92df02 renderd.py: Remove more unnecessary code 2009-01-18 01:48:23 +00:00
1db0226980 renderd.py: Cleanup debug output. Fix V1 metatile calculation 2009-01-18 01:29:06 +00:00
04023a0ae4 small clean up of renderd.py code 2009-01-17 14:40:14 +00:00
102535cfd4 Provide alternate PNG rendering using Cairo. Fix zoom 18 2009-01-10 17:50:43 +00:00
9dd499791d Fix generation of zoom 0 - 2 tiles 2009-01-10 16:03:57 +00:00
101f422926 Applied MacOSX compile fixes from Artem with a few modifications 2009-01-10 15:50:02 +00:00
8e2cb84bba Remove some unused imports, move minmax inside the only class which uses it 2009-01-10 15:37:53 +00:00
1b6b685fa7 Make render_list generate V2 requests with the Default layer 2009-01-10 15:37:08 +00:00
f0544d3c26 Render daemon code ported to Python. It is functionally equivalent to the C version but it is not intended to replace it. The python version should make it easier to experiment with new types of tile rendering 2009-01-10 14:12:51 +00:00
7e92bdd822 Declare xmlconfig as a const char * in many APIs 2009-01-05 23:12:22 +00:00
7db9d18268 Fix compile error due to PATH_MAX not being defined 2009-01-05 23:03:52 +00:00
1a3958cf0d mod_tile: New apache directives and options for multiple tile sets 2009-01-05 22:43:54 +00:00
9b7197c889 mod_tile: Fix negative expiry times. Closes #1040 2008-07-16 21:19:32 +00:00
ef0a4b044f mod_tile: update algorithm used to calculate expiry time. Now next planet dump + random(0..3 hours). 2008-07-13 12:59:40 +00:00
007fee044c mod_tile: Switch to using a md5 etag to improve caching of unchanging tiles 2008-07-13 11:33:26 +00:00
3bff3f3c48 mod_tile: Convert tile buffers to unsigned chars 2008-07-13 11:30:56 +00:00
4d4be55daf mod_tile: Switch over to using apr_stat and apr_time_t. Add Last-Modified and ETags headers. Obey conditional gets (If-Modified-Since etc). Fixes bug 1024. Remove redundant output_hook for adding expiry. 2008-07-12 23:42:12 +00:00
ab40b5e35b Add script which is used to run the bulk re-rendering of tiles each week 2008-07-01 22:21:10 +00:00
8c9e4a8ffa Add update script which is used to pull in the weekly planet and restart the rendering 2008-07-01 22:19:44 +00:00
3a636b98b2 mod_tile: Remove the map_lock. If this causes corrupted map tiles then you need to upgrade to a newer version of Mapnik (or set NUM_THREADS to 1). 2008-06-23 23:05:31 +00:00
60ecbfdc20 mod_tile: fix typo 2008-06-23 22:16:45 +00:00
4794bbc6ca mod_tile: Move map style & font location into render_config.h. Fix up operation with non-metatile rendering. Several utilities are not implemented for non-metatile (render_list, render_old, speedtest). 2008-06-23 21:55:47 +00:00
b1f2b3b516 mod_tile: Check for bad status during directory creation or rename 2008-06-10 22:47:48 +00:00
3af83fdfe1 mod_tile: Print warning message if directory creation or rename fails 2008-06-10 22:44:50 +00:00
6c9caedea9 mod_tile: Fix segv crash due to signed/unsigned mismatch error 2008-06-10 18:56:13 +00:00