UW-Macrostrat / tileserver

Tile server for Macrostrat geologic maps
MIT License
8 stars 3 forks source link

Tileserver L1 cache design (Varnish vs. Redis) #39

Open davenquinn opened 1 month ago

davenquinn commented 1 month ago

The tileserver is designed with a L1 (memory) and L2 (on-database) cache.

We should consider moving the tile cache to a separate database (#15) if there are performance implications to having it on the same database/cluster. But keeping it in the same place as the Macrostrat database may prove fine, so let's start there.

Of more immediate interest, there are two potential approaches to the "L1" cache. So far we have set up a mostly-transparent HTTP response cache (Varnish) in front of the tileserver, which caches a set quantity of the most recent requests. This has several characteristics:

A "memory key value store" like Redis would allow finer-grained control but be more tightly coupled to our application.