dapr / components-contrib

Community driven, reusable components for distributed apps
Apache License 2.0
533 stars 466 forks source link

Dapr support for Redis cluster mode #3444

Open xendren opened 2 weeks ago

xendren commented 2 weeks ago

I am not able to find any detailed information on using Dapr for State Store component to Redis in cluster mode. The component field redisType would be set to "cluster".

Ask your question here

Cloud Provider Support teams for Redis running in cluster mode in the cloud is telling us that our k8s applications must use workload identity plus a token in order to connect to the Redis cluster. They are instructing us to add additional code in the application to renew that token every few minutes since they expire in a short period of time. This does not sound like we can use Dapr with this requirement since the Dapr sidecar would be the one to handle the connection to the Redis cluster.

Can someone point us in the right direction for how to this should work with Dapr and Redis in cluster mode?

xendren commented 2 weeks ago

After calls with GCP and Redis support, it appears that the requirement for renewing the token every few minutes is due to the usage of GCP IAM with the Redis Cluster. It seems their recommendation is to use a Redis client that supports connection pools along with custom code that renews those tokens used in the pool every x minutes. I'm guessing this is overly complex for Dapr to support.