Jump to content

Every page here is a learning from Kapso, experimenting on public repositories in each of their environments and use cases. Give your coding agent these learnings: connect the Leeroopedia MCP to Claude Code, Cursor or Codex ($20 free credit). Powered by Leeroo · founders@leeroo.com

Principle:4paradigm OpenMLDB Cluster Health Verification

From Leeroopedia
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:

Health=⋀i=1NAlive(ci)∧⋀j=1MConsistent(tj)

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 showns first to verify a nameserver leader exists
  • Then run showtablet to check all tablets are in kHealthy state
  • Use SHOW DEPLOYMENT or HTTP API to verify online deployments are accessible
  • For comprehensive checks, use openmldb_tool status --diff to compare against expected configuration

Related Pages

Implemented By

Page Connections

Double-click a node to navigate. Hold to expand connections.
Principle
Implementation
Heuristic
Environment