[ 
https://issues.apache.org/jira/browse/CASSANDRA-9230?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14509617#comment-14509617
 ] 

Robert Stupp commented on CASSANDRA-9230:
-----------------------------------------

TL;DR I think, it's worth to give the proposal at least a try and do some 
benchmarks.

With CASSANDRA-8831 there would be no more need for a client (driver) to 
re-prepare the statements upon node re-connect. But clients (drivers) have to 
support that, of course.

Additionally, CASSANDRA-8831 should also mitigate your problem on initial 
connect, since C* node should not go into a situation when the same statement 
is prepared concurrently, since it already has all previously prepared 
statements.

Allowing clients to prepare multiple statements at once, could reduce CPU usage 
on both client and server due to less concurrent work (CPU).

Just thinking loud: making the _prepared-statements-table_ of CASSANDRA_8831 
distributed, looks good at first - but would involve too much work to the whole 
cluster, when data centers with different use cases (BI, production, archive) 
and therefore different statements come into play. Beside that, gossip had to 
be involved etc etc. At last, making that table part of the schema, doesn't 
feel good.

> Allow preparing multiple prepared statements at once
> ----------------------------------------------------
>
>                 Key: CASSANDRA-9230
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-9230
>             Project: Cassandra
>          Issue Type: New Feature
>          Components: Core
>            Reporter: Vishy Kasar
>            Priority: Minor
>              Labels: ponies
>
> We have a few cases like this:
> 1. Large (40K) clients
> 2. Each client preparing the same 10 prepared statements at the start up and 
> on reconnection to node
> 3. Small(ish) number (24) of cassandra nodes 
> The statement need to be prepared on a casasndra node just once but currently 
> it is prepared 40K times at startup. 
> https://issues.apache.org/jira/browse/CASSANDRA-8831 will make the situation 
> much better. A further optimization is to allow clients to create not yet 
> prepared statements in bulk.This way, client can prepare all the not yet 
> statements with one round trip to server. 



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to