- ids are integers
- max UDP datagram size is
2^16 = 65536
$ make
$ make docker
$ make test
$ bin/main
-i ID
, node identifier-p PORT
, port to listen on-c ID:IP:PORT
, connect to node with idID
, with ipIP
, listening on portPORT
-f FANOUT
, fanout (if-f 0
it behaves as a flood algorithm)-t INTERVAL
, synchronization interval (milliseconds)
The defaults are:
-i 0
-p 3000
-f 1
-t 1000
Three nodes with identifiers 0
, 1
and 2
, all connected:
$ bin/main -i 0 -p 3000 -c 1:127.0.0.1:3001 -c 2:127.0.0.1:3002
$ bin/main -i 1 -p 3001 -c 0:127.0.0.1:3000 -c 2:127.0.0.1:3002
$ bin/main -i 2 -p 3002 -c 0:127.0.0.1:3000 -c 1:127.0.0.1:3001
$ docker-compose up handoff0 handoff1 handoff2
Chaos testing with pumba
After running docker-compose up pumba0 pumba1
,
- packet loss
$ pumba netem --tc-image gaiadocker/iproute2 --duration 5m --interface eth0 loss --percent 50
- packet duplication
$ pumba netem --tc-image gaiadocker/iproute2 --duration 5m --interface eth0 duplicate --percent 50