Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Config a read-only Redis instance #282

Open
hobojoe opened this issue Aug 8, 2019 · 2 comments
Open

Config a read-only Redis instance #282

hobojoe opened this issue Aug 8, 2019 · 2 comments

Comments

@hobojoe
Copy link

hobojoe commented Aug 8, 2019

Hi,

I am using AWS Redis service and I have a primary server and 1 readonly replica. In my app, most of the cache usage is readonly, so I tried to configure cache manager to have 2 instances, one for Write and another for Read.

But while instantiating the READONLY one, it fails with the message: "No writeable endpoint found"

Is there a way to achieve what I want?

My main purpose is that the replicas sit there only waiting for the primary to go down. I would like to use those to "free" some of the load of the primary node.

Thanks

@MichaCo
Copy link
Owner

MichaCo commented Aug 8, 2019

That's not really supported, no.
But, you can trick it by enabling the twemproxy setting I think, which disables a couple of features, including the check for writeable nodes.

You'd have to test that, I cannot really tell what else might throw exceptions

@jasenf
Copy link

jasenf commented Dec 18, 2019

I was just looking at doing the same thing. Using Redis on Azure, highly distributed instances of our app service, so they can't all access the same Redis server. We setup a cluster with many read-only servers. Unfortunately, all writes need to go do a specific server, while reads should come from the instances "local" Redis server. This would be very slick if CacheManager supported it and I can imagine used by many.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants