cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Joshua McKenzie (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (CASSANDRA-8086) Cassandra should have ability to limit the number of native connections
Date Tue, 03 Mar 2015 16:32:06 GMT

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

Joshua McKenzie commented on CASSANDRA-8086:
--------------------------------------------

It appears you've double-decremented on the connectionsPerClient record when the IP's over
the limit:
{code}
if (perIpCount.incrementAndGet() > perIpLimit)
{
   perIpCount.decrementAndGet();
   // The decrement will be done in channelClosed(...)
{code}

While counter is decremented in channelClosed and likely what that comment refers to, you're
also decrementing the connectionsPerClient record again for the address in question.

Other than that, LGTM.

> Cassandra should have ability to limit the number of native connections
> -----------------------------------------------------------------------
>
>                 Key: CASSANDRA-8086
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-8086
>             Project: Cassandra
>          Issue Type: Bug
>            Reporter: Vishy Kasar
>            Assignee: Norman Maurer
>             Fix For: 2.1.4
>
>         Attachments: 0001-CASSANDRA-8086-Allow-to-limit-the-number-of-native-c-2.0.patch,
0001-CASSANDRA-8086-Allow-to-limit-the-number-of-native-c-final.patch, 0001-CASSANDRA-8086-Allow-to-limit-the-number-of-native-c.patch,
0001-CASSANDRA-8086-Allow-to-limit-the-number-of-native-c.txt
>
>
> We have a production cluster with 72 instances spread across 2 DCs. We have a large number
( ~ 40,000 ) of clients hitting this cluster. Client normally connects to 4 cassandra instances.
Some event (we think it is a schema change on server side) triggered the client to establish
connections to all cassandra instances of local DC. This brought the server to its knees.
The client connections failed and client attempted re-connections. 
> Cassandra should protect itself from such attack from client. Do we have any knobs to
control the number of max connections? If not, we need to add that knob.



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

Mime
View raw message