scylladb / cassandra-stress

Apache License 2.0
4 stars 8 forks source link

Improve cassandra-stress to support multi DC testing #16

Open tzach opened 8 years ago

tzach commented 8 years ago

cassandra-stress (c-s) is our go to tool for benchmark. It will be useful if we can use it to benchmark Scylla/Cassandra cluster on failures, in particular DC failures.

c-s chose which DC to work in the client builder code. Currently c-s is using the default, DCAwareRoundRobinPolicy() which creates a new datacenter aware round robin policy, with one, random DC.

There is also a DCAwareRoundRobinPolicy(String localDc, int usedHostsPerRemoteDc)[1][2] which provide the client fail over to other DC, c-s does not use it[2]

I suggest a new c-s options -remote-dc n to set the number of remote DC hosts to connect to.

[1] http://docs.datastax.com/en/drivers/java/2.2/com/datastax/driver/core/policies/DCAwareRoundRobinPolicy.html [2] https://github.com/apache/cassandra/blob/b51f9495e5f1dc9573aa08139009569a1916f82f/tools/stress/src/org/apache/cassandra/stress/util/JavaDriverClient.java#L113 [3] https://github.com/datastax/java-driver/blob/2.1/driver-core/src/main/java/com/datastax/driver/core/policies/DCAwareRoundRobinPolicy.java

penberg commented 8 years ago

@tzach I sent a patch on the mailing list. Help needed with testing it.

asias commented 8 years ago

@penberg What is the status of the patch. Is the patch merged in https://github.com/scylladb/scylla-tools-java? How can we use it?

penberg commented 8 years ago

@asias It's not merged because nobody was able to test it.

amoskong commented 7 years ago

@penberg what's the patch? (mail subject) Do you have build packages / AMI / etc? If not I can build by myself. I added support for multi-dc in SCT (AWS & GCE), so we can test your patch.

penberg commented 7 years ago

The patch subject is "[PATCH scylla-tools v1] cassandra-stress: Add new '-remote-dc' command line option".

amoskong commented 7 years ago

Asked pekka to rebase the patch to latest code, I would like to test it.