docs: raft cluster status, plans closed, CHANGELOG/README/monitoring
- Add raft-cluster-status overview (C3a/C3b/post-C3b shipped on main) - Mark C3a/C3b design+plans done; refresh operator docs en/bg - CHANGELOG 1.2.0 Raft section; README cluster example and status line - monitoring.md health/metrics match real HTTP port+440 and raft series
This commit is contained in:
@@ -5,9 +5,11 @@ BaraDB поддържа разпределено внедряване с Raft к
|
||||
> ⚠️ **Ограничение при множество бази данни**
|
||||
> Разпределените модули (Raft, шардиране и репликация) в момента работят само с **`default`** базата данни. Ако използвате множество бази (`CREATE DATABASE`, `USE DATABASE`), разпределените функции още не ги обхващат. Всяка база данни се нуждае от отделна кластър конфигурация.
|
||||
|
||||
> **Статус (2026-07-30):** Raft C3a (мрежова election), C3b (SQL записи), DDL репликация, leader forwarding, log compaction и metrics са **на `main`**. Преглед: `docs/superpowers/specs/2026-07-30-raft-cluster-status.md`.
|
||||
|
||||
## Raft Консенсус
|
||||
|
||||
Leader election и log репликация през TCP. Включване:
|
||||
Leader election и log репликация през TCP; SQL DML/DDL за **default** минават през raft log. Включване:
|
||||
|
||||
| Env | Значение |
|
||||
|-----|----------|
|
||||
|
||||
+16
-11
@@ -4,29 +4,28 @@
|
||||
|
||||
### HTTP Health Endpoint
|
||||
|
||||
HTTP слуша на **TCP порт + 440** (напр. `BARADB_PORT=9472` → health на `9912`).
|
||||
|
||||
```bash
|
||||
curl http://localhost:9470/health
|
||||
curl http://localhost:9912/health
|
||||
```
|
||||
|
||||
Отговор:
|
||||
Без raft:
|
||||
|
||||
```json
|
||||
{
|
||||
"status": "healthy",
|
||||
"status": "ok",
|
||||
"version": "1.1.6",
|
||||
"uptime_seconds": 86400,
|
||||
"checks": {
|
||||
"storage": "ok",
|
||||
"memory": "ok",
|
||||
"connections": "ok"
|
||||
}
|
||||
"raft": { "enabled": false }
|
||||
}
|
||||
```
|
||||
|
||||
С `BARADB_RAFT_ENABLED=true` — обект `raft` (`role`, `term`, `leader_id`, `commit_index`, `apply_lag`, `log_entries`, `snapshot_index`).
|
||||
|
||||
### Readiness Probe
|
||||
|
||||
```bash
|
||||
curl http://localhost:9470/ready
|
||||
curl http://localhost:9912/ready
|
||||
```
|
||||
|
||||
Връща `200 OK` когато сървърът е готов да приема трафик, `503` по време на стартиране.
|
||||
@@ -35,10 +34,16 @@ curl http://localhost:9470/ready
|
||||
|
||||
### Prometheus-Съвместими Метрики
|
||||
|
||||
Същият HTTP порт като health (`BARADB_PORT + 440`).
|
||||
|
||||
```bash
|
||||
curl http://localhost:9470/metrics
|
||||
curl http://localhost:9912/metrics
|
||||
```
|
||||
|
||||
Базови: `baradb_queries_total`, `baradb_query_errors_total`, `baradb_inserts_total`, `baradb_selects_total`, `baradb_connections_active`.
|
||||
|
||||
С raft: `baradb_raft_is_leader`, `baradb_raft_term`, `baradb_raft_log_entries`, `baradb_raft_apply_lag`, `baradb_raft_commit_wait_ms_total`, `baradb_raft_elections_total`, `baradb_raft_forwards_total`, `baradb_raft_compactions_total` и др. Пълен списък: [distributed.md](distributed.md) / [en/monitoring.md](../en/monitoring.md).
|
||||
|
||||
Примерен изход:
|
||||
|
||||
```
|
||||
|
||||
Reference in New Issue
Block a user