Can you set up a redis server (in a VPS or EC2 instance) to be the "slaveof" an ElasticCache Redis instance?

StackOverflow https://stackoverflow.com/questions/21390319

سؤال

I am considering using Amazon ElastiCache Redis. However, I would like to be in control of my replication, and so I would like to know if it's possible to set up redis-server on a VPS (non-Amazon) or on an EC2 Amazon to be the slave of the ElastiCache Redis instance.

If not, then is ElastiCache Redis worth using when you want to use Redis as an in-memory data storage with reliable persistency, and not only for mere "caching" of data?

Thank you,

هل كانت مفيدة؟

المحلول

Yes, it is possible to do so. The replication protocol works on the same redis connection. So if you can connect to elastic cache from the VPS or EC2, you will also be able to install a slave on that machine.

نصائح أخرى

As of Amazon's updates for Redis 2.8.22 you can no longer use non-ElastiCache replication nodes. The SYNC and PSYNC commands will be unrecognized. This change appears to affect all Redis versions, so you can't circumvent it by using a pre-2.8.22 Redis instance.

An alternative would be to use an EC2 instance as a master node, however you would lose the management benefits ElastiCache provides, needing to set up and maintain everything by yourself.

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top