Skip to content

bug(cache): standalone mode against a cluster-enabled Redis misses silently #669

Description

@EricAndrechek

Area: cache (Redis backend, #626 / #630)

cache.redis.mode: standalone pointed at a cluster-enabled server degrades silently:

  • Keys whose slot the node doesn't own get a MOVED reply.
  • The breaker counts MOVED as "server up", so it never opens.
  • Lookups for those keys always miss, and their bumps stay deferred, with nothing logged.

This comes from reading refusesWork; that the single client does not follow MOVED is inferred.

Options considered in #626, none taken:

  • Refuse at connect when INFO cluster reports cluster_enabled:1. This could also refuse single-endpoint cluster services that work in standalone mode today, such as Dragonfly's emulated cluster mode and possibly ElastiCache Serverless. Both are unverified.
  • Treat MOVED as a refusal. The breaker would flap whenever the probe key's slot is local.

Suggested: detect MOVED replies and log once at ERROR ("server is cluster-enabled; set cache.redis.mode: cluster") without opening the breaker. Alternatively, verify the single-endpoint services first, then refuse at connect.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area/cacheLocal / shared / tiered cachingbugSomething isn't working

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions