There are a ton of factors that can impact query performance.
The cassandra native protocol supports multiple simultaneous requests per connection. Most drivers by default only create one connection to each C* host in the local data center. That being said, that shouldn't be a problem, particularly if you are only executing 20 concurrent requests, this is something both driver clients and C* handles well. The driver does do some write batching to reduce the amount of system calls, but I'm reasonably confident this is not an issue.
It may be worth enabling client logging
to see if that shines any light. You can also enable tracing on your requests by specifying traceQuery
as a query option (example
) to see if the delay is caused by C*-side processing.
Also keep in mind that all user code in node.js is handled in a single thread. If you have callbacks tied to your responses that do non-trivial work, that can delay subsequent requests from being processed, which may give impression that some queries are slow.