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

Jonathan Ellis commented on CASSANDRA-2176:
-------------------------------------------

There's three options for capping the number of connections:

- close the listening socket
- leave the socket open but stop accept()ing connections
- accept new connections, send an error message, then close them

The third option is generally seen as "best" (some discussion: 
http://fixunix.com/unix/379049-server-socket-how-limit-number-connections.html) 
but Thrift doesn't give us a way to send an error w/o first processing a 
request.  So I'm wondering if we should go with option 2 instead -- "timed out 
trying to connect" seems more straightforward than option 1 (indistinguishable 
from cassandra not running) or option 3 (which makes it easy to do the wrong 
thing on the client side -- i.e. a naive client may immediately try to 
reconnect).

Thoughts?

> Add configuration setting to cap the number of Thrift connections
> -----------------------------------------------------------------
>
>                 Key: CASSANDRA-2176
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-2176
>             Project: Cassandra
>          Issue Type: Improvement
>          Components: API
>            Reporter: Jonathan Ellis
>            Assignee: T Jake Luciani
>            Priority: Minor
>             Fix For: 0.7.3
>
>         Attachments: 
> 0001-CASSANDRA-2176-limit-connected-clients-and-config.txt
>
>   Original Estimate: 4h
>  Remaining Estimate: 4h
>
> At least until CASSANDRA-1405 is done, it's useful to have a connection cap 
> to prevent misbehaving clients from DOSing the server.

-- 
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to