t-rex icon indicating copy to clipboard operation
t-rex copied to clipboard

Redis for caching

Open musicformellons opened this issue 7 years ago • 5 comments

How would one go about using Redis for caching with t-rex?

musicformellons avatar Jun 21 '17 20:06 musicformellons

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

pka avatar Jun 22 '17 07:06 pka

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!

musicformellons avatar Jun 22 '17 07:06 musicformellons

@pka how about geowebcache?

shanligang avatar Aug 09 '17 13:08 shanligang

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.

pnorman avatar Aug 11 '17 00:08 pnorman

@pka:

  • Any updated on sqlite3/mbtiles implementation ?

jorgejesus avatar Jul 01 '20 08:07 jorgejesus