Package simulation provides tools meant to visualize or test aspects of a Cockroach cluster on a single host.
Gossip creates a gossip network of up to 250 nodes and outputs successive visualization of the gossip network graph via dot.
Uses tcp sockets for connecting 3, 10, 25, 50, 100 or 250 nodes. Generates .dot graph output files for each cycle of the simulation.
go install github.com/cockroachdb/cockroach/cmd/gossipsim gossipsim -size=(small|medium|large|huge|ginormous)
Log output includes instructions for displaying the graph output as a series of images to visualize the evolution of the network.
Running the large through ginormous simulations will require the open files limit be increased either for the shell running the simulation, or system wide. For Linux:
# For the current shell: ulimit -n 65536 # System-wide: sysctl fs.file-max fs.file-max = 50384
# To view current limits (soft / hard): launchctl limit maxfiles # To edit, add/edit the following line in /etc/launchd.conf and # restart for the new file limit to take effect. # # limit maxfiles 16384 32768 sudo vi /etc/launchd.conf