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

Kirk True commented on CASSANDRA-3017:
--------------------------------------

I finally have some numbers to report on relative mutation sizes between Thrift 
and inter-node messages.

I added a bit of code to MessageIn/MessageOut to count for intra-cluster 
message sizes and wrote a custom TTransport that counts Thrift message sizes.

I used the {{cassandra-stress}} tool to insert data and then grepped the logs. 
I performed two tests, both inserting a single row with columns of value size 
1000.

The first test was 1 column:

{noformat}
sh ./tools/bin/cassandra-stress -c 1 -n 1 -S 1000 -t 1 -l 3 -e QUORUM
{noformat}

Thrift's message size is 1,106 bytes. Messages are 1,089 bytes, or 17 bytes 
less.

The second test was 1000 columns:

{noformat}
sh ./tools/bin/cassandra-stress -c 1000 -n 1 -S 1000 -t 1 -l 3 -e QUORUM
{noformat}

Thrift's message size is 1,037,960 bytes. Messages are 1,018,962 bytes, or 
18,998 bytes less.

Now, I have no idea if this information is pertinent anymore, but in this one 
case, Thrift provides an upper bound for the length under which messages can 
safely pass without being considered too large.
                
> add a Message size limit
> ------------------------
>
>                 Key: CASSANDRA-3017
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-3017
>             Project: Cassandra
>          Issue Type: Improvement
>          Components: Core
>            Reporter: Jonathan Ellis
>            Assignee: Kirk True
>            Priority: Minor
>              Labels: lhf
>         Attachments: 
> 0001-use-the-thrift-max-message-size-for-inter-node-messa.patch, 
> trunk-3017.txt
>
>
> We protect the server from allocating huge buffers for malformed message with 
> the Thrift frame size (CASSANDRA-475).  But we don't have similar protection 
> for the inter-node Message objects.
> Adding this would be good to deal with malicious adversaries as well as a 
> malfunctioning cluster participant.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Reply via email to