Skip to content

[Enhancement] Add health check endpoint monitoring with feature flag auto-disable on degradation #665

Description

@RUKAYAT-CODER

Overview

src/store/slices/healthDashboardStore.ts polls service health but does not automatically respond to degraded states by disabling dependent features. When the streaming API is degraded, the app continues offering streaming courses — they fail after a timeout, showing errors to users. Automatic feature flag adjustment during degradation would hide failing features and show static alternatives gracefully.

Specifications

Features:

  • Health check results mapped to feature flags in degradationStore
  • Streaming API degraded → auto-disable streaming, fall back to paginated content
  • Payment API degraded → show 'Payments temporarily unavailable' instead of payment form
  • Recovery restores features automatically
  • Admin can override auto-disable via remote config

Tasks:

  • Define HEALTH_TO_FEATURE_MAP in src/config/degradationConfig.ts
  • After each health check cycle, apply feature flags based on service status
  • Show user-friendly fallback UI when feature auto-disabled
  • On service recovery, re-enable feature flag
  • Add unit test for degradation → disable → recovery → re-enable cycle

Impacted Files:

  • src/store/slices/healthDashboardStore.ts
  • src/store/slices/degradationStore.ts
  • src/config/degradationConfig.ts (create)

Acceptance Criteria

  • Streaming API health check failure disables streaming feature flag
  • User sees static content fallback during streaming degradation
  • Recovery enables streaming feature within 60 seconds
  • Unit test covers full degradation → fallback → recovery cycle

Metadata

Metadata

Assignees

Labels

Stellar WaveIssues in the Stellar wave programenhancementNew feature or request

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions