pivotal-cf / java-cfenv

Apache License 2.0
91 stars 56 forks source link

Add support for Redis clustering #171

Open jdeppe-pivotal opened 2 years ago

jdeppe-pivotal commented 2 years ago

Similar to #32, I'd like to propose adding support for Redis clustering to java-cfenv. Since Redis clustering allows for node discovery via the various CLUSTER commands, there is greater flexibility in how cluster support can be signaled. One nice aspect is that only a single node need be provided in order for additional nodes to be discovered.

For spring-data-redis to enable clustering, I believe it is only required that the property spring.redis.cluster.nodes be set.

Here are some proposals on how this could be implemented:

I'd be happy to provide a PR for this work.

pivotal-david-osullivan commented 2 years ago

Hi @jdeppe-pivotal, thanks for the suggestion, apologies for the delay in response.

Do you have some examples of service instance JSON which include the cluster tag or redis-cluster URI scheme you mentioned as possible implementation solutions?

These would need to exist in service bindings so that they could be identified and processed by the library.