miroir/miroir.yaml
jedarden 1b9dc1d8c3 P2.1: Implement axum server skeleton with health/version/ready/topology/shards/metrics endpoints
- Load Config (file + env + CLI args overlay) via MiroirConfig::load()
- Initialize tracing with JSON-to-stdout format (plan §10)
- Start two axum listeners: :7700 (client API) + :9090 (metrics, unauthenticated)
- Signal handlers for graceful shutdown (SIGTERM → drain → exit)
- GET /health returns {"status":"available"} immediately (Meilisearch-compatible)
- GET /version returns Meilisearch version from healthy node (60s TTL cache)
- GET /_miroir/ready returns 503 during startup, 200 once covering quorum reachable
- GET /_miroir/topology returns cluster state per plan §10 JSON shape
- GET /_miroir/shards returns shard → node mapping table
- GET /_miroir/metrics returns admin-key-gated Prometheus metrics
- Background health checker promotes nodes to Active when reachable
- UnifiedState bundles AuthState, Metrics, and admin_endpoints::AppState

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-04-19 06:12:05 -04:00

20 lines
367 B
YAML

shards: 64
replication_factor: 1
replica_groups: 1
master_key: "test-master-key"
node_master_key: "test-node-master-key"
admin:
api_key: "test-admin-key"
nodes:
- id: "meili-0"
address: "http://localhost:8100"
replica_group: 0
health:
interval_ms: 1000
timeout_ms: 500
cdc:
buffer:
overflow: "drop"
search_ui:
rate_limit:
backend: "local"