Skip to content

Make Java service discovery Redis Cluster compatible #32

Description

@zhchxiao123

What to build

Make Java service registration and discovery work correctly when the SDK is configured for Redis Cluster. Services should be able to register, heartbeat, unregister, refresh cached instance lists, and discover healthy instances through the same public APIs used in standalone mode.

The implementation should use the existing cluster-aware Redis abstraction or an equivalent business-level abstraction instead of borrowing a standalone Redis resource directly. Keep same-service keys aligned with the v2 key schema so the active-instance index and instance-detail hash remain safe under Cluster.

Acceptance criteria

  • Registering a service instance succeeds in Redis Cluster mode and makes the instance visible to discovery clients.
  • Heartbeats update the active-instance timestamp in Redis Cluster mode without relying on a standalone connection pool.
  • Unregistering a service removes both the instance details and active-instance entry in Redis Cluster mode.
  • Discovery refresh reads active instance IDs and details in Redis Cluster mode and preserves health-threshold filtering.
  • Existing standalone service discovery behavior remains covered by tests.
  • Tests cover the Cluster path without direct calls to a standalone-only Redis resource.

Blocked by

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requestready-for-agentFully specified, ready for an AFK agent

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions