[Tile-serving] [mod_tile] Added couchbase combined storage (#63)

kayrus notifications at github.com
Fri Dec 27 17:08:08 UTC 2013


Hello!

Inspired by mbtiles storage I've added Couchbase storage to mod_tile (it is actually two memcached storages). One storage is bucket for meta info (path -> md5), second storage is for tiles (md5 -> binary data).

Couchbase is distributed key->value database and it supports memcached protocol.

config string should be as follows:
```
TILEDIR=couchbase:{memcached://localhost:11211,memcached://localhost:11212}
```

Default memcached storage is not suitable for metatiles. Each tile request creates metatile request and 500 rps generate 200 mb/s traffic. So I decided to store each png tile in one key to minimize traffic. Tiles / metainfo ratio is approximately 1/3.

I've also altered meta2tiles utility to convert metatile to couchbase storage.

In addition it is very simple to use nginx-lua for tile serving from couchbase.

One huge disadvantage is no possibility to update old tiles with new ones, as there is no inverted index for md5 -> path value. Actually it is possible to add third bucket for that, but the logic will become more complicated.
You can merge this Pull Request by running:

  git pull https://github.com/kayrus/mod_tile master

Or you can view, comment on it, or merge it online at:

  https://github.com/openstreetmap/mod_tile/pull/63

-- Commit Summary --

  * added couchbase combined storage

-- File Changes --

    M Makefile.am (6)
    M configure.ac (2)
    M extra/Makefile (6)
    M extra/meta2tile.c (56)
    M includes/metatile.h (1)
    M includes/store.h (9)
    A includes/store_couchbase.h (15)
    A mod_tile.spec (116)
    M src/gen_tile.cpp (6)
    M src/metatile.cpp (25)
    M src/store.c (6)
    A src/store_couchbase.c (332)
    M src/store_file.c (1)
    M src/store_memcached.c (25)
    M src/store_null.c (2)
    M src/store_rados.c (1)
    M src/store_ro_composite.c (8)
    M src/store_ro_http_proxy.c (1)

-- Patch Links --

https://github.com/openstreetmap/mod_tile/pull/63.patch
https://github.com/openstreetmap/mod_tile/pull/63.diff
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/tile-serving/attachments/20131227/a38ee347/attachment.html>


More information about the Tile-serving mailing list