mirror of
https://github.com/hanzoai/datastore.git
synced 2026-09-26 13:55:07 +00:00
Adds a stress testing framework for ClickHouse Keeper under `tests/stress/keeper/`, wired into CI (PR gate + nightly workflows). Key components: - Workloads: `keeper_bench.py` runner with YAML-defined workload profiles (`prod_mix.yaml`, `read_requests.yaml`, `write_requests.yaml`, etc.) - Scenarios: `core_no_faults.yaml` and `core_faults.yaml` with netem-based network fault injection (latency, jitter, packet loss) - Fault framework: `faults/network.py` (netem), `faults/base.py` (step dispatcher with `kind: parallel` support) - Metrics: `MetricsSampler` collects keeper stats, `sink.py` writes JSONL, ingested into CIDB via `ingest_keeper_metrics.py` post-hook - Gates: scenario pass/fail conditions based on RPS, p99 latency, error rate - Grafana dashboards for run details, 1vs1 comparison, historical progression CI integration: - PR job: 3 no-fault scenarios (prod-mix, read-multi, write-multi), ARM_LARGE, 15 min each, runs when `src/Coordination/` or stress test files change - Nightly (no-faults): all no-fault scenarios, default + rocks backends, ARM_LARGE - Nightly (faults): all fault scenarios, default + rocks backends, ARM_LARGE - Single `keeper_stress_job` config; mode detected via `Info().pr_number` and `Info().workflow_name` inside the job script Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
41 lines
1.9 KiB
YAML
41 lines
1.9 KiB
YAML
# RaftKeeper (JDRaftKeeper) 3-node cluster for keeper stress tests.
|
|
# Uses RAFTKEEPER_IMAGE (default: raftkeeper:test) and per-node config dirs.
|
|
# Host ports via RAFTKEEPER_HOST_PORT_1/2/3 (defaults 18101, 18102, 18103) for host access.
|
|
services:
|
|
raftkeeper1:
|
|
image: ${RAFTKEEPER_IMAGE:-raftkeeper:test}
|
|
stop_grace_period: 5s
|
|
restart: always
|
|
volumes:
|
|
- ${RAFTKEEPER_CONFIG_DIR1:-/tmp/rk1}/config.xml:/etc/raftkeeper/config.xml
|
|
- ${RAFTKEEPER_DATA_DIR1:-/tmp/rk1/data}:/var/lib/raftkeeper
|
|
- ${RAFTKEEPER_LOG_DIR1:-/tmp/rk1/log}:/var/log/raftkeeper
|
|
ports:
|
|
- "${RAFTKEEPER_HOST_PORT_1:-18101}:8101"
|
|
entrypoint: ["/usr/bin/raftkeeper", "server", "--config", "/etc/raftkeeper/config.xml"]
|
|
cpus: 2
|
|
raftkeeper2:
|
|
image: ${RAFTKEEPER_IMAGE:-raftkeeper:test}
|
|
stop_grace_period: 5s
|
|
restart: always
|
|
volumes:
|
|
- ${RAFTKEEPER_CONFIG_DIR2:-/tmp/rk2}/config.xml:/etc/raftkeeper/config.xml
|
|
- ${RAFTKEEPER_DATA_DIR2:-/tmp/rk2/data}:/var/lib/raftkeeper
|
|
- ${RAFTKEEPER_LOG_DIR2:-/tmp/rk2/log}:/var/log/raftkeeper
|
|
ports:
|
|
- "${RAFTKEEPER_HOST_PORT_2:-18102}:8101"
|
|
entrypoint: ["/usr/bin/raftkeeper", "server", "--config", "/etc/raftkeeper/config.xml"]
|
|
cpus: 2
|
|
raftkeeper3:
|
|
image: ${RAFTKEEPER_IMAGE:-raftkeeper:test}
|
|
stop_grace_period: 5s
|
|
restart: always
|
|
volumes:
|
|
- ${RAFTKEEPER_CONFIG_DIR3:-/tmp/rk3}/config.xml:/etc/raftkeeper/config.xml
|
|
- ${RAFTKEEPER_DATA_DIR3:-/tmp/rk3/data}:/var/lib/raftkeeper
|
|
- ${RAFTKEEPER_LOG_DIR3:-/tmp/rk3/log}:/var/log/raftkeeper
|
|
ports:
|
|
- "${RAFTKEEPER_HOST_PORT_3:-18103}:8101"
|
|
entrypoint: ["/usr/bin/raftkeeper", "server", "--config", "/etc/raftkeeper/config.xml"]
|
|
cpus: 2
|