Hi, does `growthbook-proxy` support using a Redis ...
# ask-questions
g
Hi, does
growthbook-proxy
support using a Redis instance with Sentinel enabled for the cache backend?
More details: We are getting errors that make it look like
growthbook-proxy
is trying to write to read-only redis nodes, which sentinel should prevent. We've started hosting
growthbook-proxy
in our k8s infrastructure as a proxy for Growthbook Cloud, but are getting intermittent errors when using Redis as the
CACHE_ENGINE
, particularly when quickly switching the feature on and off (server sent events). • We've set
REDIS_URL=redis://:<PASSWORD>@<REDIS-SVC-NAME>.<NAMESPACE>.svc.cluster.local
• We are connecting to a shared Redis instance that uses Redis Sentinel • The specific error in the `growthbook-proxy`logs is:
ReplyError: READONLY You can't write against a read only replica.\n    at parseError (/usr/local/src/app/node_modules/redis-parser/lib/parser.js:179:12
• We also intermittent connection errors in the UI for the SDK Connection (
POST returned an invalid status code: 500
)
h
We do not officially support this, however it's something we could consider adding support for with enough interest. (Or if anybody wanted to open up a PR to introduce support...)
g
@happy-autumn-40938 I've opened up a PR (here) to introduce redis sentinel support (in the same style as the existing redis cluster mode options). It's working well locally and deployed to k8s.
h
Hi @gorgeous-student-70220, thanks so much for this PR. I've merged it and will be doing a tagged release soon. (apologies about the delay, I was on vacation simple smile)
🎉 1
g
That's great to hear, thank you!