Pooling Option

505 views
Skip to first unread message

Karthick V

unread,
Sep 27, 2016, 12:56:26 PM9/27/16
to DataStax Java Driver for Apache Cassandra User Mailing List
Hi,

        In v3 protocol it was told that the it can server upto 32k request per connection which has a default value of 1024 for local and 258 for remote host which can be set by the following method .
 
   With ProtocolVersion#V3 or above, there are up to 32768 requests per connection, and the pool defaults to a fixed size of 1. You will typically raise the maximum capacity by allowing more simultaneous requests per connection (setMaxRequestsPerConnection(HostDistance, int)).
 in which i have the following question
  1. Form the point of cassandra node,how many simultaneous request a node can handle . 
  2. let say i have N application server and N Session (session per application) what will be the ideal value of (setMaxRequestsPerConnection(HostDistance, int)) for each session.And if it is OS or hardware related please share how to find it with some example. 

Olivier Michallat

unread,
Sep 29, 2016, 4:54:31 PM9/29/16
to java-dri...@lists.datastax.com
Hi,

From the point of cassandra node,how many simultaneous request a node can handle

This is determined by two configuration parameters:
- native_transport_max_threads (in cassandra.yaml) controls the number of threads that handle requests coming from the client. Each request holds a thread until the response is sent back to the client. The default is 128.
- the system property -Dcassandra.max_queued_native_transport_requests controls how many requests can be enqueued when those transport threads are busy. When that limit is reached, I/O threads will in turn start blocking. The default is also 128.

These defaults might seem low, but most requests are processed in a few milliseconds. You can achieve high throughputs before you have to tune them (see the discussions on CASSANDRA-11363, which is where the queue size became configurable).


what will be the ideal value of (setMaxRequestsPerConnection(HostDistance, int)) 

There's no universal answer, you'll have to benchmark your application to find out if you need to tune it.
As you can see from the above, the default value is already high given what a node can handle. But again, most requests are fast, so unless you're explicitly trying to push the system to the limit you probably have a lot less concurrent requests at a given point in time. 

--

Olivier Michallat

Driver & tools engineer, DataStax


--
You received this message because you are subscribed to the Google Groups "DataStax Java Driver for Apache Cassandra User Mailing List" group.
To unsubscribe from this group and stop receiving emails from it, send an email to java-driver-user+unsubscribe@lists.datastax.com.

Reply all
Reply to author
Forward
0 new messages