docker-redis-cluster icon indicating copy to clipboard operation
docker-redis-cluster copied to clipboard

docs: how to test elasticache configuration endpoint

Open joebowbeer opened this issue 4 years ago • 5 comments

It would be helpful if your README explained if/how one is able to run your redis-cluster so that it provides a single configuration endpoint like ElastiCache in cluster-enabled mode.

joebowbeer avatar Jun 17 '20 05:06 joebowbeer

@joebowbeer I dont run a AWS ElastiCache myself so i have no idea what changes would be needed in order to make it work the same way if that is even possible right now?. If you have this kind of information what changes would be needed to the images, is that something you can put into a PR and submit?

Grokzen avatar Jun 17 '20 10:06 Grokzen

The paragraphs below are copied from ElastiCache docs. The term "configuration endpoint" seems to be unique to ElastiCache. I read that what ElastiCache calls a replication group is like the real cluster. I was wondering if there was a way to configure your test cluster to present like an ElastiCache cluster.

A Redis (cluster mode enabled) cluster has a single configuration endpoint. By connecting to the configuration endpoint, your application is able to discover the primary and read endpoints for each shard in the cluster.

Redis (cluster mode enabled) has a configuration endpoint which "knows" all the primary and node endpoints in the cluster. Your application connects to the configuration endpoint. Whenever your application writes to or reads from the cluster's configuration endpoint, Redis, behind the scenes, determines which shard the key belongs to and which endpoint in that shard to use.

joebowbeer avatar Jun 17 '20 12:06 joebowbeer

@joebowbeer That is not really possible in this container as it would require me to build a REST endpoint or something that would query the cluster to build this "configuration endpoint" since the configuration endpoint is not something that is supported natively from redis but is something custom that AWS provides/supports.

I have no plans on building a service or feature like that to simulate this myself. If you @joebowbeer or someone else would like to build this and add it to the solution inside the image running through supervisord as some form of simple API/REST endpoint that simulates this AWS behaviour.

Grokzen avatar Jun 17 '20 13:06 Grokzen

Isn't the AWS EC configuration endpoint a static alias to one of the nodes in the cluster? In that case, your local configuration entrypoint can be any of the local nodes.

jordigarcl avatar Jul 25 '20 15:07 jordigarcl

@JordiGarcL Yes that is true that AWS EC has some helper endpoint that returns the location of all nodes to your cluster.

Grokzen avatar Nov 08 '20 10:11 Grokzen