tileify-ags-proxy icon indicating copy to clipboard operation
tileify-ags-proxy copied to clipboard

Add a caching layer?

Open iandees opened this issue 10 years ago • 3 comments

What do you think about adding a very simple caching layer to this service so that the ESRI server doesn't have to deal with repeated requests for the same image?

My use-case here is that I want to run this on OpenStreetMap US's server and let people add their own layers, cache them, and share the imagery with the whole community.

iandees avatar Sep 16 '15 15:09 iandees

Yeah, this seems valuable. This app could bring a slower ArcGIS Server instance to its knees with multiple users hitting it.

I'm not sure what type of caching implementation would make the most sense. Something like leveldown might be fairly easy to implement. Redis would probably work well too, but I don't think the free tier offered by RedisToGo would go very far (5MB). Memcachier would probably work too, and provides 25MB on a free tier.

If some cache was implemented, it would be awesome to make it optional because as it stands now this app needs little more than node + express to run, which is great for folks who want to stand up one-off instances for small projects.

JasonSanford avatar Sep 16 '15 15:09 JasonSanford

Yep, optional makes sense.

I was thinking about using Postgres. On Heroku they offer 10K rows for free and don't mention a size limit. Although swapping out postgres for memcache/redis would be pretty easy.

I'll give it a try soon and put together a pull request for comment.

iandees avatar Sep 16 '15 15:09 iandees

I would be interested in this as well. What about something like express-tile-cache npm module? It has built-in support for caching tiles to the filesystem, redis and s3.

https://github.com/CGastrell/express-tile-cache

tmcgee avatar Sep 16 '15 16:09 tmcgee