Reputation: 11
I want to create slowness in Cassandra to test my application. Is there any specific ways to induce slowness in Cassandra. In RDBMS we use locking, to wait for other operation until the lock is released. As Cassandra doesn't have locking, is there any other way to create deadlock, slowness etc.
Upvotes: 1
Views: 381
Reputation: 833
You could check out our project here simulacron. https://github.com/datastax/simulacron
This is a C*/DSE simulator, that was written specifically to test things like race conditions, and error conditions. You would have to prime all your relevant queries ahead of time, but it would allow you introduce a wait time, or errors to your responses. You can also simulate a large cluster on your local machine.
There is also a similar tool called scassandra, which does much of the same thing. http://www.scassandra.org/
Upvotes: 2
Reputation: 8157
Maybe easier to just limit the network on the nodes. Depending on the OS ure using there are different options.
Upvotes: 0
Reputation: 2466
There are many ways to do it, i'll list two:
Link to the docs: https://docs.datastax.com/en/cql/3.3/cql/cql_using/useCreateUDF.html
select some_column from table where other_column = 'something' allow filtering;
where other_column is not a partition key of the table. It will result in full table scan, and since Cassandra isn't built for it, it will take some time (also I/O and CPU).
Upvotes: 1