feat(scaling): add cluster_node_heartbeats migration for stateless HPA#473
Open
teslims2 wants to merge 1 commit into
Open
feat(scaling): add cluster_node_heartbeats migration for stateless HPA#473teslims2 wants to merge 1 commit into
teslims2 wants to merge 1 commit into
Conversation
- Create cluster_node_heartbeats table to track active node instances, internal IPs, and health metrics (cpu/mem/connections) per region - Add idx_cluster_node_heartbeats_last_seen index for lightweight recency lookups supporting short-lived retention schedules - Add idx_cluster_node_heartbeats_region_status index for regional health-check queries - Add prune_stale_cluster_nodes() function to evict rows older than 60 s, called by the maintenance worker Closes kellymusk#456
|
@teslims2 Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits. You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Data Model Design
Design a PostgreSQL analytics schema including aml_monthly_snapshots and aml_metric_aggregates to store pre-computed compliance metrics.
Add historical indexes to tracking tables for aml_alerts (e.g., status, triggered_at, resolved_at) to optimize time-series aggregation.
Create database migration scripts for the new reporting tables.
2. Core Implementation
Implement a cron-style background worker utilizing tokio-cron-scheduler that executes daily and monthly aggregation passes.
Develop optimized SQL aggregation queries to compute core effectiveness metrics: False Positive vs. True Positive ratios, mean time to resolution (MTTR), and total volume of blacklisted Stellar addresses interacting with cNGN.
Build a reporting service layer in Rust that handles date-range slicing, caching of compiled historical reports in Redis, and structured data serialization.
Closes #456
Closes #455
Closes #453
Closes #454
Closes #456