question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Investigate for Client-side caching using Redis Cluster and Master/Replica

See original GitHub issue

Feature Request

v6 introduces an awesome new feature (Server-assisted Client-side caching support). There is a limitation currently where it can only be used with Redis Standalone setups. It would be great to extend this support for Redis Cluster and Master/Replica environments.

See https://github.com/lettuce-io/lettuce-core/issues/1281#issuecomment-669028055 for more details.

Is your feature request related to a problem? Please describe

No

Describe the solution you’d like

Client side caching to work with Redis Cluster and Master/Replica.

Describe alternatives you’ve considered

N/A

Teachability, Documentation, Adoption, Migration Strategy

Ideally it would just use the new CacheFrontend in v6 such that the Redis topology doesn’t matter.

Issue Analytics

  • State:open
  • Created 3 years ago
  • Reactions:13
  • Comments:8 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
blasphemiccommented, Mar 24, 2022

I’m sorry if you felt if my comment was trying to shame you; it was of course not intended that way. I was merely trying to express that this feature (which is awesome in itself) simply lose some if its value if only usable in certain circumstances.

I don’t expect anything from open-source projects. It is just a bonus when things like this simply work.

1reaction
mp911decommented, Jan 7, 2021

There are a few challenges to address:

  1. Re-apply CLIENT TRACKING settings upon reconnect: While that is primary a resiliency feature, in Master/Replica or Cluster mode that is a must since we don’t get hold easily of cluster connections. We also need to apply tracking settings when creating a new connection
  2. Topology changes: Whenever the topology changes, we need to adapt to that. Meaning also that we need to carry over tracking settings. More over, how does the migration path look like when in Redis Cluster a slot assignment gets migrated to a new node? What about the server side, does it carry over also all touched keys? I assume not so reconfiguration can cause dropped notifications since the new server is no longer aware of the key subscriptions from the old server. While this could be done (with a lot of effort) on the client side, I think that is too complex.
  3. Finally, I don’t have time to do that in the near future nor I see how I can do that alone in 2021.

Please also refer to #1467 which isn’t solved and a pre-requisite to all future work.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Client-side caching in Redis
Client -side caching is a technique used to create high performance services. It exploits the memory available on application servers, servers that are...
Read more >
redis-cache: send read traffic to replicas (#9414) - GitLab
The redis client handles load balancing between replicas (at connection time) when running in sentinel mode (source). This is separate from (and ...
Read more >
How to Monitor Redis Performance Metrics - Datadog
The data is sent to the client along with the buffered commands when the background save is complete. Each time a replica performs...
Read more >
Discovery service | Redis Documentation Center
If you need to use another client, consider using Sentinel Tunnel to discover the current Redis master with Sentinel and create a TCP...
Read more >
Troubleshooting - Amazon ElastiCache for Redis
If clients and the ElastiCache cluster are in different subnets, ... If the load is predominantly reads, using multiple read-replicas can balance the ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found