https://github.com/pingcap/chaos
A test framework for linearizability check with Go
https://github.com/pingcap/chaos
linearizability
Last synced: 6 months ago
JSON representation
A test framework for linearizability check with Go
- Host: GitHub
- URL: https://github.com/pingcap/chaos
- Owner: pingcap
- License: apache-2.0
- Created: 2017-09-02T06:45:11.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2019-07-10T11:21:59.000Z (over 6 years ago)
- Last Synced: 2024-12-18T16:35:15.208Z (about 1 year ago)
- Topics: linearizability
- Language: Go
- Homepage:
- Size: 4.9 MB
- Stars: 208
- Watchers: 26
- Forks: 28
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Chaos
Chaos is used to check the distributed system linearizability.
Chaos is inspired by [jepsen](https://github.com/jepsen-io/jepsen) and uses [porcupine](https://github.com/anishathalye/porcupine) as its linearizability checker.
## Architecture
Chaos runs your registered database on 5 nodes, sends the command through `ssh` to control the service, like starting/stoping the service, or using a nemesis to disturb the whole cluster.
```
+-------------+
+------- | controller | -------+
| +-------------+ |
| | | | |
| +----+ | | |
v v | | v
+----+----+----+ | | +----+----+
| n1 | n2 | n3 | <+ +> | n4 | n5 |
+----+----+----+ +----+----+
```
## Usage
In one shell, we start the 5 nodes and the controller.
```
cd docker
./up.sh
```
In another shell, use `docker exec -it chaos-control bash` to enter the controller, then:
```
# build the node and your own chaos test
make
# run you own chaos like
./bin/chaos-tidb
```
## Scaffold
It is very easy to write your own chaos test. TODO...