-
Notifications
You must be signed in to change notification settings - Fork 115
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
[QUESTION] Management of 2 redis caches (behind fusioncache) for HA #292
Comments
Hi @sabbadino , sorry for the delay. This is a scenario I'm thinking about for some time, and there are different ways to tackle it. Now that v1.4.0 is out I think I can try to come up with something... will update. Meanwhile, a couple of questions.
Question: are the 2 app instances behind the same hostname, with a load balancer/gateway in front of them or are they reachable separately?
Would they connect to the same db instance?
Would the admin app also be deployed in 2 different regions? If so, behind the same hostname with load/balancer etc (see above).
Correct, as of today no.
On top of
Maybe another idea to try out is to listen for Set/Remove/Expire events on the "primary" cache of the region, and for each event trigger an eviction on the other one. I'm not 100% sure there will be no hiccups, I'd have to play with this and think about it more, but it's something you can play with and see how it goes. I'll think about it a little more, let me know if you try something like this. |
Question: are the 2 app instances behind the same hostname, with a load balancer/gateway in front of them or are they reachable separately? Question: Would they connect to the same db instance? Answer's Now they are (all using the west instance). The plan is to have north region web app pointing to north region redis and west Europe web app point to west Europe redis. Question ' Would the admin app also be deployed in 2 different regions? If so, behind the same hostname with load/balancer etc (see above). Same as question 1 : two different regions for HA. You say : On top of Remove/Expire, also Set! I am not that concerned about the set .. that is , not that concerned to lower the cache hits. You say : goid idea : leveraging events makes the app code unaware of this "forwarding" . My intent is to have not a primary. Enrico |
Hi, we have our app deployed in west and north europe for HA.
As of now they both share the same azure redis cache.
We were considering to have 2 redis caches , one in north and one in west .. having north app pointing to north redis and west app pointing to west redis.
I am not that worried about the increment of cache misses. My "problem" is when i need a cache entry invalidation (e.g. when i cache user permissions and they are modified in the backoffice of the app by the admin).
I don't think it comes out of the box.
What comes to my mind is to register both redis instances as named fusioncaches. The west app will use the named one linked to redis west for all calls , but when it has to call Remove/Expire: In this case it will send the command to both named caches.
Does it makes sense ? Is there a better way ?
thanks Enrico
The text was updated successfully, but these errors were encountered: