skip to Main Content

We have a lot of Redis instances, consuming TBs of memory and hundreds of machines.

With our business activities goes up and down, some Redis instances are just not used that frequent any more — they are “unpopular” or “cold”. But Redis stores everything in memory, so a lot of infrequent data that should have been stored in cheap disk are occupying expensive memory.

We are exploring a way to save the memory from these unpopular/cold Redis, as to reduce our machines usage.

We cannot delete data, nor can we migrate to other database. Are there some way to achieve our goals?

PS: We are thinking of some Redis compatible product that can “mix” memory and disk, i.e. it stores hot data in memory but cold in disk, and USING LIMITED RESOURCES. We know RedisLabs’ “Redis on Flash(ROF)” solution, but it uses RocksDB, which is very memory unfriendly. What we want is a very memory restrained product. Besides, ROF is not open source 🙁

Thanks in advance!

2

Answers


  1. Your problem might be solved by using an orchestrator approach: scaledown when not in use, scale up when in demand.

    Implementation depends much on your infrastructure, but a base requirement is proper monitoring of Redis instances usage.
    Based on that, if you are running on Kubernetes, you can leverage pod autoscaling.

    Otherwise you can implement Consul and use HAProxy to handle the shutdown/spin-up logic. A starting point for that strategy is this article.

    Of course Reiner’s idea of using swap is a quick win if it works the intended way!

    Login or Signup to reply.
  2. ElastiCache Redis now supports data tiering. Data tiering provides a new cost optimal option for storing data in Redis by utilizing lower-cost local NVMe SSDs in each cluster node in addition to storing data in memory. It is ideal for workloads that access up to 20 percent of their overall dataset regularly, and for applications that can tolerate additional latency when accessing data on SSD. More details about data tiering can be found here.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search