Skip to content

v0.57.0

Latest

Choose a tag to compare

@github-actions github-actions released this 30 Nov 08:27
· 18 commits to master since this release
2f2f041

Each cluster now has a placement mode and policy, and BetterDB holds a slot move back while the cluster is unhealthy. Large clusters are cheaper to watch: cluster-wide checks and topology reads run once per cluster, and one failover sends one cluster.failover event instead of one per node. Cluster alerts now name the node at fault, and the Cluster page has a Disagreements tab for nodes that see the cluster differently.

Upgrade notes

  • Placement mode: clusters you already had start in Recommend, so their plans and the run button stay. Clusters added after the upgrade start in Observe, which hides plans and refuses runs with 403 observe_mode. Switch the mode on the Cluster page's Slot placement card. Moves still need BETTERDB_SLOT_MIGRATION=true.
  • New settings: CLUSTER_NODE_COMMAND_TIMEOUT_MS (default 5000), LATENCY_REGRESSION_IGNORE_COMMANDS (unset keeps the built-in list, empty turns the filter off), LATENCY_REGRESSION_EXTRA_IGNORE_COMMANDS (default empty) and PLACEMENT_ACTION_RETENTION_DAYS (default 90).
  • Fewer events: one failover now sends one cluster.failover per cluster, and a single-connection setup gets one webhook per outage instead of two. Cluster-wide alerts are raised once per cluster and stored under the seed connection, so a list filtered to another node's connection no longer shows them.
  • Partial joins: a node only part of the cluster knows now raises partial_membership after 90 s instead of topology_divergence after 60 s. Update anything that matches on the old type.
  • Latency regressions no longer report admin and monitoring commands such as info and cluster|nodes. Open events for them stay until you resolve them.
  • Helm: unknown service.* keys now fail helm install and helm upgrade, and Service annotation and label values must be strings (use --set-string).
  • npm package: @betterdb/monitor now needs Node.js 22 or later. The agent and MCP images move from node:20-alpine to node:26-alpine, and the agent image no longer ships npm.
  • Storage: on startup BetterDB adds the placement_policies, placement_actions, placement_steps and placement_locks tables and an anomaly_events.node column. activity_events is upgraded to accept system and anonymous actors, which rebuilds the table on SQLite.
  • No new ACL permissions are needed.

Slot placement (#763, #764, #769, #770, #773, #774)

  • Modes and support: each cluster runs in Observe or Recommend. The Slot placement card shows shard balance against the median and lists every reason a cluster can't take slot moves, such as a managed provider, missing slot stats, version or ACL. Approve and Auto are shown but can't be picked yet. MCP tool get_placement_status returns the same.
  • Policy: admins edit a per-cluster policy from Edit policy: resolve ratio, node CPU limit, and excluded shards and slots. Saves are versioned and logged as placement.policy.
  • Sustained load: a shard triggers only when its load stays high for most of sustainMinutes, so short peaks don't. This only decides when a plan is offered; nothing moves on its own. The card shows a Sustained badge or the warm-up time.
  • Safety gate: a move waits while a node is failed or suspect, a migration is running, or there are open failover, fork, latency or replication events, and the card says what it waits for. A blocked run answers 403 with blockedBy: "gate".
  • Hash tags: a hot shard now says when one hash tag or one crowded slot holds the load, since moving slots can't split those keys. No LFU policy is needed.
  • Stored actions: slot moves, their steps and per-node cluster locks are now stored, so two moves never touch the same nodes at once and the hourly budget holds across restarts.

Cluster health

  • Disagreements tab (#746, #747, #748): the Cluster page summarises where node views disagree, one line per disagreement with the count of views on each side and one row per shard. Ask every node reads every node's view once instead of a sample. MCP tool get_topology_disagreements returns the summary.
  • Partially known nodes (#740, #741): partial_membership names the peers that know the node and those that don't, plus the CLUSTER MEET command that repairs it. BetterDB never runs it.
  • Node at fault (#744, #745, #750): cluster anomaly events carry a node object (id, address, role, shard, zone). It is sent in anomaly.detected, failover, data loss, retry amplification and replication webhooks, in Slack and Discord messages and in MCP results. Alerts link to the node on the Cluster page, where an admin can Connect to this node if BetterDB doesn't collect it yet.

Large clusters (#738, #752, #759, #761, #766, #767, #768)

  • Every primary is checked: past 64 primaries they are read in rotation instead of being skipped. betterdb_anomaly_fanout_sweep_seconds shows how long a full sweep takes.
  • Once per cluster: one connection per cluster runs the cluster-wide checks. With more than nine connections the others read CLUSTER NODES in turns, and the reader reads it every 5 seconds instead of every poll.
  • Hung nodes: a node that accepts connections but stops answering no longer stalls polling. Per-node commands time out after CLUSTER_NODE_COMMAND_TIMEOUT_MS, the node is skipped for 30 s, and a silent database raises instance.down with Database ping timed out.

Other changes

  • Helm chart (#756): the chart is now released with every app release at the same version, to both the classic repo at https://docs.betterdb.com/charts and oci://ghcr.io/betterdb-inc/charts. 0.57.0 is the first release in the classic repo since 0.51.1. New Service options: nodePort, annotations, labels, loadBalancerClass, loadBalancerSourceRanges and externalTrafficPolicy.
  • OpenEverest (#760): BetterDB can be added as an OpenEverest plugin for Valkey instances, with read-only agent connections. It ships separately as agent 1.9.0 and the betterdb-openeverest chart 0.1.0; see docs/install/openeverest.md. The same PR fixes cluster mode detection in the classic agent.
  • npm package startup (#775): npx @betterdb/monitor failed with Cannot find package 'better-auth' in every release since #432. It now starts, and --no-setup without a saved config starts on defaults. MCP start_monitor and stop_monitor also work again.
  • Agent reconnects (#754): a reconnected agent is no longer dropped when its old socket closes later. Two agents sharing a token now leave one connected instead of swapping.
  • Rebalance targets (#743): a target with maxmemory 0 gets a memory_unlimited warning instead of "memory room is not known".
  • Security (#775): patched dependency and image findings (effect, glob, minimatch, hono, follow-redirects, openssl and others). Known issue: musl CVE-2026-107891 remains in all Alpine images until a fixed Alpine stable release ships.