Caching methods

Tim Watts
  • Tim Watts

    Tim Watts - 2012-01-07


    Just wondered if anyone had done a study of various caching methods used with
    iipsrv? I'm thinking of memcached vs memcachedb vs memcached+massive swap file
    vs varnishd in front of iipsrv?

    In our application we have a massive store of jpeg2000 files which never
    change (apart from new ones being added) and an expected high and random load
    of tile requests.

    With that scenario a disk backed persistent cache would appear to make sense.
    Just wondered if anyone had any thoughts?



  • Ruven

    Ruven - 2012-01-09

    For the IIPImage demos, we use both varnish and memcached. Our front-end
    server uses varnish, which caches not just the IIPImage tiles, but the static
    web page elements also. And iipsrv uses additionally memcached. So there's
    nothing to stop you combing caching methods. I guess you could replace varnish
    with memcached for caching of your main web server also, but I've found the
    performance of varnish to be very good.

  • Stephan

    Stephan - 2012-01-09

    Though I'm currently not too deep into the code, I'ld suggest to use some
    output caching, as already noted by ruven. If you'ld prefer to cache the
    rendered tiles, I'ld strongly suggest to get over memcached. is a
    more usable key/value store for huge data demands. memcached just drops pairs
    or denies to store if the RAM has ended. redis instead can be configured to
    move date from RAM to Disk and vice versa. Also the garbage collecter can be
    tuned for the particular needs.

  • Ruven

    Ruven - 2012-01-10

    IIPImage only stores tiles as binary blobs in memcached, so the more advanced
    features of redis aren't really necessary (unless of course you are also using
    redis for something else). I've never tried redis myself, but it looks like it
    would be easy to add support for this. Have you tried it out with IIPImage?

    One of the other key features of memcached is the ability to easily set up and
    run a cluster of servers. redis seems to be more master-slave oriented.



Cancel  Add attachments

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

No, thanks