cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Joshua McKenzie (JIRA)" <>
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


Joshua McKenzie commented on CASSANDRA-8086:

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

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:
>             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,
> 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

View raw message