asopi tech
asopi techIndie Developer

Asopitech With · Feature flag management

LaunchDarkly with Alopex Chirps & Alopex DB

LaunchDarkly is a feature flag management service that turns features on and off without redeploying. What if we rebuilt it with Alopex Chirps and Alopex DB?

Updated: Oct 13, 2026

What the service does

LaunchDarkly is a service for managing feature flags. New features are switched on and off, or targeted at users, without redeploying. The data is flag definitions, targeting rules and change history.

How the communication is built

  • Raft consensus: a flag change is proposed to a Raft group and, once agreed, applied to every node’s state machine in the same order. Every node ends up with the same settings in the same order.
  • Alopex DB tables: the state machine writes flag definitions and targeting rules to Alopex DB tables, and keeps the change history as rows. Who changed what, and when, can be checked with SQL.
  • Joining nodes: a new node joins from the seed list, catches up as a Raft learner, and then becomes a voting member.

Evaluating flags to decide on or off for each user is the application’s code.

Deployment

Chirps and Alopex DB are embedded in each node of the services that use flags. No separate cluster is needed for consensus.

Why Alopex Chirps and Alopex DB fit

Feature flags depend on every node having the same settings and on changes being traceable later. Chirps aligns the order of changes through Raft, and Alopex DB keeps the result and history in tables you read with SQL.

See it in code

The flag change history lives in Alopex DB (ordering consensus via Chirps’ Raft). Just the core of reading the history and the current value.

import alopex

# 変更の履歴は Alopex DB(変更の順序の合意は Chirps の Raft)
db = alopex.Database.open("launchdarkly.alopex")

db.execute_sql("""
    CREATE TABLE IF NOT EXISTS flag_changes (
        flag_key TEXT,
        who TEXT,
        enabled INTEGER,
        changed DATE
    )
""")

changes = [
    ("new-ui", "aya", 0, "2026-10-18"),
    ("new-ui", "ken", 1, "2026-10-20"),
]
for flag_key, who, enabled, changed in changes:
    db.execute_sql("INSERT INTO flag_changes (flag_key, who, enabled, changed) VALUES (?, ?, ?, ?)", [flag_key, who, enabled, changed])

# いつ誰が何を変えたかを、履歴から新しい順に引く
print("-- 変更履歴")
for row in db.execute_sql("SELECT changed, who, enabled FROM flag_changes WHERE flag_key = ? ORDER BY changed DESC", ["new-ui"]):
    print("  ", row["changed"], row["who"], "ON" if row["enabled"] else "OFF")

# いまの値(最新の変更)を出す
now = db.execute_sql("SELECT enabled FROM flag_changes WHERE flag_key = ? ORDER BY changed DESC LIMIT 1", ["new-ui"])[0]
print("現在:", "ON" if now["enabled"] else "OFF")

You can trace who changed what and when in SQL, and the latest change is the current value. Applying the same order on every node is handled by Chirps’ Raft.

Build feature flag delivery with Alopex Chirps and Alopex DB, aligning flag changes through Raft and tracing history with SQL. Start from the quickstart on GitHub.