简体   繁体   中英

Is diskcache on a shared network volume officially supported?

We are running ImageResizer on multiple AWS Instances (currently 4) using an Elite license. At the moment each instance has its own local cache but that means each image request is generated and cached independently on every instance.

It also means when we deploy a new instance we either start with an empty cache and suffer poor performance on that instance while it populates, or copy the cache from an existing instance (this takes quite some time)

I was thinking of putting the cache on a shared network drive, access by all the instances.

Is this officially support, and would this cause any conflicts? Would all the servers attempt to run the cleanup operation if autoClean is enabled?

You would need to disable autoClean ; cache eviction over the network is not an efficient process.

You would also see increased latency across the board and increased file lock contention.

It is a tradeoff that I don't normally suggest, but - measure for yourself. There are scenarios where it makes sense, but it's highly dependent on hit ratio, cache size, storage constraints, fileshare protocol, and whether you have any reverse proxy/cdn in play.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM