[postgis-users] Postgres as cache and renderer for vector tile server

Paul Ramsey pramsey at cleverelephant.ca
Mon Mar 21 09:34:47 PDT 2016

ISTM that map-specific tile caching solutions are mostly there to
provide things that generic HTTP caching systems don't do, like
metatiling, or guttering the map requests. If you don't need those
features, I think a generic HTTP cache in front of your web service
would be the most architecturally attractive solution, no? Stick in
squid or varnish and apply whatever cache lifetime parameters you want
at the cache level.

At the higher end, using a generic tool like varnish makes it easy to
bolt in a CDN as well. There's a cool talk about using S3 and AWS CDN
for tile caching https://vimeo.com/142215056. S3 gets more supple for
this kind of thing all the time.



On Mon, Mar 21, 2016 at 8:59 AM, Peter Devoy <peter at 3xe.co.uk> wrote:
> Hi all,
> Has anyone here tried using Postgres as the caching layer in a vector tile
> server?
> I need to set up a tile server and what I am thinking is have PostGIS cut up
> geometries into GeoJSON vector tiles as requests come in and cache the JSON for
> said requests in some other Postgres table(s) using a JSON/JSONB column. Then
> just have a cron job or something set up to prune the cache table so that the
> least frequently accessed tiles get removed.
> I know there are existing vector tile server solutions but I would like to be
> serving tiles in British National Grid rather than web mercator so they would
> all need some hacking.  I also have reservations about their architecture --
> I would rather not complicate my stack if Postgres can handle it.
> Is it a dumb endeavour?
> Kind regards
> Peter
> _______________________________________________
> postgis-users mailing list
> postgis-users at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/postgis-users

More information about the postgis-users mailing list