Skip to content

Implement node status synchronization in Controller, including downtime notifications and online/offline management#388

Open
Paragrf wants to merge 2 commits intoapache:unstablefrom
Paragrf:ha
Open

Implement node status synchronization in Controller, including downtime notifications and online/offline management#388
Paragrf wants to merge 2 commits intoapache:unstablefrom
Paragrf:ha

Conversation

@Paragrf
Copy link
Copy Markdown

@Paragrf Paragrf commented Apr 10, 2026

Background
To improve cluster reliability and operational efficiency, the controller needs to bridge the status gap between slave nodes and the server. Beyond just reporting unexpected failures, it is essential to support proactive maintenance workflows, allowing operators to safely remove traffic before performing node updates or hardware swaps.

Key Changes

  • Downtime Push: The controller now monitors slave node health and proactively pushes "Downtime" alerts to the server upon detection of a crash or heartbeat timeout.

  • Manual Offline (Traffic Draining): Supports a proactive "Offline" command. This allows the server to drain/stop traffic to a specific slave node before any maintenance work begins, ensuring zero-impact operations.

  • Manual Online: Supports a "Ready-to-Serve" notification when a slave is back online and fully synchronized, allowing the server to safely re-enable traffic.

Related Issues
Fixes #385

@codecov-commenter
Copy link
Copy Markdown

codecov-commenter commented Apr 10, 2026

Codecov Report

❌ Patch coverage is 79.04762% with 22 lines in your changes missing coverage. Please review.
✅ Project coverage is 50.09%. Comparing base (6c56470) to head (87937e4).
⚠️ Report is 105 commits behind head on unstable.

Files with missing lines Patch % Lines
controller/cluster.go 54.16% 7 Missing and 4 partials ⚠️
server/api/node.go 73.91% 4 Missing and 2 partials ⚠️
server/helper/helper.go 0.00% 2 Missing ⚠️
store/cluster.go 95.45% 1 Missing and 1 partial ⚠️
server/route.go 0.00% 1 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##           unstable     #388      +/-   ##
============================================
+ Coverage     43.38%   50.09%   +6.70%     
============================================
  Files            37       45       +8     
  Lines          2971     3885     +914     
============================================
+ Hits           1289     1946     +657     
- Misses         1544     1724     +180     
- Partials        138      215      +77     
Flag Coverage Δ
unittests 50.09% <79.04%> (+6.70%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@git-hulk git-hulk self-requested a review April 10, 2026 06:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Broadcast the replica downtime to surviving nodes, allowing Redis clients to refresh their topology and drain traffic from the offline node.

2 participants