0

I am experimenting with Cassandra on 4 sites with 2 nodes on each one. Have small network latency between them. I always query the data in DC where I inserted it. I see very strange behavior: when I increase the nodes number the query response time slowly increasing, but insert time is improving. I am expecting that query time should improve as well. Any suggestion regarding configurations check?

0

Response time heavily dependent on the query that you're executing & how you're executing them. Linear scalability is achieved only if you're performing reads by primary or at least partition key. If you're doing something like SELECT * FROM table WHERE non_pk_column = 'something' ALLOW FILTERING or SELECT * FROM table, then Cassandra will need to get data from all your nodes, and as you increase the number of nodes, the latency is increasing.

Also, when executing query you need to make sure that you're using token aware load balancing policy that will send query request to the coordinator node that has one of the replicas.

But it's a really broad question, please provide more information about your queries, etc.

| improve this answer | |
  • I agree that my question is incomplete. I am query by partition key without allowing filtering. Any suggestion how to diagnose the issue? – Yuri Lansberg Jan 5 at 9:01
  • Check how the query is sent - do you use prepared queries or not? Enable tracing to check where the bottleneck is. What is the size of partition with data? What hardware is used? – Alex Ott Jan 5 at 18:00

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.