0

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.

asked Nov 30, 2015 at 9:40
0

1 Answer 1

1

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

answered Nov 30, 2015 at 10:05
Sign up to request clarification or add additional context in comments.

5 Comments

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.
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
@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.
But won't it affect the performance because it will be based on cloud?
2023 update look into amazon memorydb redis

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.