Limiting number of requests in cassandra without causing starting timeout ticking

Viewed 155

The DataStax Cassandra driver of version 4 has got a feature of the throttling.

The documentation states:

Similarly, the request timeout encompasses throttling: the timeout starts ticking before the throttler has started processing the request; a request may time out while it is still in the throttler's queue, before the driver has even tried to send it to a node.

Great. However, let's say I have a dynamic list of some ids and I want to execute select requests to cassandra in parallel (using executeAsync()) for all ids in the list. Having list too large I will eventually face timeouts if requests are residing in the throttler's queue too long.

How can I overcome this issue? Is there any built-in rate limiting technique so I can do not care about how many requests in parallel I can execute, but just throw all of them to cassandra and then wait until they all are completed??

UPD: I am not interested in custom code solutions, as ofc we are capable to implement our own rate limit solution. I am asking precisely about driver's built-in mechanisms to achieve this.

0 Answers
Related