Skip to content

Infra: Implement Consul-based Poller Service Discovery and Leader Election #421

Description

@EDOHWARES

Description

Implement service discovery and leader election for event pollers to guarantee high availability.

Current Problem

Pollers run as single points of failure. Running multiple instances results in duplicate event processing and storage pollution.

Proposed Solution

Integrate Consul to coordinate leader election and partition poller tasks across healthy nodes.

Technical Tasks

  • Configure Consul client libraries and registration routines in backend
  • Implement a leader election loop using Consul session keys
  • Build service health check endpoints in poller modules
  • Implement dynamic partitioning of contract monitoring across multiple active nodes

Acceptance Criteria

  • Only one leader poller ingestion loop is active per monitored contract
  • Standby nodes detect leader failures and take over within 10 seconds
  • Active pollers report health metrics to Consul registry

Testing Requirements

  • Deploy multiple instances in Docker, terminate the leader, and assert standby promotion

Metadata

  • Priority: High
  • Difficulty: High

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

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions