I am using Redis in my Node.js application. I don't use it for caching and I don't want to. I want my data in the Redis to be persistent at any point. Also my every call to redis write to the disk. Is it helpful to use the Amazon elastic cache in such case? Because I understand that Amazon elastic cache handles standby replication and automatic failover which is very important to me. I am running my Node.js server on Amazon EC2. Any help or suggestion would be appreciated.
1 Answers
Currently Amazon ElasticCache's way for keeping a persistent state is through snapshotting which means it uses the Backup and Restore feature to keep a copy in an S3 bucket that you can use for loading your data again in the case of losing it or warming up a new instance.
The backup and restore feature uses BGSAVE in the background, and as a heavy operation on your instance if setup to be done periodically , it is recommended to be running on a read replica.
So to answer your question; I do not think Amazon ElasticCache is a solution for your problem. it was meant for solutions who are looking for a cache layer to scale/speed up lookups for their apps that are running on other storage engines.
Update: As a manually setup alternative (taken from the comments)
If you are opened to setting up your own instance of Redis cluster redis.io/topics/cluster-spec that will be your best bet, it takes care of AFO, and replication, with persistence options enabled as append only file or backing up to RDB files

- 1,938
- 17
- 26
-
So could you suggest any solution which handles automatic failover and replicas for Redis. We just use a single key in Redis but we can't loose a single value at any point, and that is incremented every time we access the key. – Viddesh Nov 30 '15 at 10:33
-
If you are opened to setting up your own instance of Redis cluster http://redis.io/topics/cluster-spec that will be your best bet, it takes care of AFO, and replication, with persistence options enabled as `append only file` or backing up to RDB files – Rabea Nov 30 '15 at 10:41
-
1@Viddesh - you should look into Redis Labs' Redis Cloud. The Standard and Multi-AZ plans take care of replication and automatic failover. Both plans can be configured for persistence with AOF, snapshots and scheduled/on-demand backups to multiple destinations. Oh, and you can use clustering to transparently scale on demand. Lastly, Redis Cloud is available straight off AWS' cloud as a service or, alternatively, you can use the commercial enterprise version to deploy your own. – Itamar Haber Nov 30 '15 at 10:56
-
But won't it affect the performance because it will be based on cloud? – Viddesh Dec 08 '15 at 05:18
-
12023 update look into amazon memorydb redis – PirateApp Jul 12 '23 at 05:36