2

I need to build a image/static file cache which would host maybe few hundred up to thousand static files from 1kb to ~200kb. I'd need super fast reads (I'm using redis, but it's one threaded and I'm not sure how it's clustering works since it's in testing and I need to have multiple cache servers).

I have tried: Redis, ElasticSearch and MongoDB.

Can you please give me some advice which database software would be the best for:

  • With TTL or something similar
  • Very fast reads
  • Clustering is not important, but it would be nice if it has it

If you decide to downvote which I know many of you will do, please let me know why you did it.

3
  • 1
    Hope you'll be not downvoted, as it is a very good question. In a similar context some yrs ago I decided to write my own small db-class purely in php. It stores key=>value pairs in arrays, written to php-files. Values can also be json-encoded, if it makes sense. So, write activities are not very fast, but reads are. I am using it for setup scripts (before mysql is running) or for image cache base64-encoded. If you're running php, I'll be back here with some code, if you want.
    – ddlab
    Mar 2, 2015 at 17:13
  • Thank you for your comment. Unfortunately I'm not able to use PHP and I need to use Lua, but it's not a problem.. Problem is to store images and static files. I decided to experiment with Riak, maybe it works better than Redis (it would be awesome because Riak has nice clustering system)
    – Jason
    Mar 2, 2015 at 19:14
  • You're welcome. Good luck. Redis... I am (absolutely) not sure, but isn't it running / storing data just in server memory?
    – ddlab
    Mar 2, 2015 at 19:48

0

Browse other questions tagged .