t-rex
t-rex copied to clipboard
Redis for caching
How would one go about using Redis for caching with t-rex?
Interesting request. I never heard of someone using Redis for tile caching. Do you see a specific advantage? I'm open to all kind of backends. My current priority list is:
- Other file cache layouts (like Mapstash #14)
- S3
- SQLite/MBTiles
- others
Well, I noticed they use redis within tilezen/tileserver and tilezen/tilequeue: https://github.com/tilezen
And also at: https://github.com/faradayio/tilesplash
I presume this improves performance, but I am not even close to an expert in these matters.
BTW: t-rex is pretty cool!
@pka how about geowebcache?
mod_tile supports redis, but afaik it's untested in production. Kartotherian uses Cassandra for tile caching, but we've looked at the idea of moving this to Postgres to reduce the number of services we have to maintain.
I think Cassandra has the advantage that you can pick an API that's common to it and S3.
My suggestion for a priority list would be
- 6-component file cache layout (#14, as far as I can tell). This is a fairly standard format, although there are the zz/xxx/xxx/xxx/yyy/yyy/yyy and [Z]/[xxxxyyyy]/[xxxxyyyy]/[xxxxyyyy]/[xxxxyyyy]/[xxxxyyyy] variants.
- Cassandra. Being open-source puts this above S3 for me
- S3
- others
I don't consider mbtiles a great option. It's designed to transfer tiles around, not act as a cache, and tends to have problems under heavy concurrent loads.
@pka:
- Any updated on sqlite3/mbtiles implementation ?