Principle:4paradigm OpenMLDB Cluster Health Verification
| Knowledge Sources | |
|---|---|
| Domains | Distributed_Systems, DevOps |
| Last Updated | 2026-10-12 12:00 GMT |
Overview
A verification methodology for assessing the health and operational status of a distributed cluster by querying component state, tablet availability, and table integrity.
Description
Cluster health verification is the practice of systematically checking that all components in a distributed system are operational and that data is properly distributed. In OpenMLDB, this involves: checking nameserver availability (showns), verifying tablet registration and health (showtablet), inspecting table status (show table status), confirming deployment availability via HTTP API, and running static configuration checks. This principle ensures that after deployment, scaling, or maintenance operations, the cluster is in a known-good state.
Usage
Use this principle after any cluster lifecycle event — initial deployment, scaling, upgrade, or recovery. It provides the confidence that all components are operational before routing production traffic.
Theoretical Basis
Health verification follows the command-query separation pattern for distributed systems:
Where c_i are cluster components and t_j are table partitions. All components must be alive AND all table partitions must be consistent for the cluster to be healthy.
Pseudo-code for health check:
# Abstract algorithm (NOT real implementation)
def verify_cluster_health(cluster):
# 1. Check nameserver availability
ns_list = showns(cluster)
assert any(ns.state == "leader" for ns in ns_list)
# 2. Check tablet registration
tablets = showtablet(cluster)
assert all(t.state == "kHealthy" for t in tablets)
# 3. Check table partition health
for table in all_tables(cluster):
partitions = get_table_partition(table)
assert all(p.is_alive() for p in partitions)
assert any(p.is_leader() for p in partitions)
Practical Guide
- Run
shownsfirst to verify a nameserver leader exists - Then run
showtabletto check all tablets are inkHealthystate - Use
SHOW DEPLOYMENTor HTTP API to verify online deployments are accessible - For comprehensive checks, use
openmldb_tool status --diffto compare against expected configuration