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

Jonathan Ellis commented on CASSANDRA-5719:
-------------------------------------------

I'm convinced that there is a problem here, but I am not a fan of this 
solution. :)  Cosider the case where a client is still alive but hasn't issued 
a command for 4 hours. We nuke his client state, but not the connection itself 
-- there's no way for the client to figure out why his connection suddenly 
broke.

We can make this arbitrarily unlikely by extending the timeout window, but IMO 
the "right" way to fix this is to hook into Thrift and have it destroy the 
ClientState when the connection dies.  I'm not sure how to do this but I'm 
reasonably optimistic it's possible.  [~tjake] [~carlyeks] ?
                
> Expire entries out of ThriftSessionManager
> ------------------------------------------
>
>                 Key: CASSANDRA-5719
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-5719
>             Project: Cassandra
>          Issue Type: Improvement
>          Components: Core
>    Affects Versions: 1.2.0
>            Reporter: Jason Brown
>            Assignee: Jason Brown
>            Priority: Minor
>              Labels: cache, thrift
>             Fix For: 1.2.7, 2.0 beta 1
>
>         Attachments: 5719-v1.patch
>
>
> TSM maintains a map of SocketAddress (IpAddr, and the ephemeral port) to 
> ClientState. If the connection goes away, for whatever reason, entries are 
> not removed from the map. In most cases this is a tiny leakage. However, at 
> Netflix, we auto-scale services up and down everyday, sometimes with client 
> instance lifetimes of around 36 hours. These clusters can add hundreds of 
> servers at peak time, and indescriminantly terminate them at the trough. 
> Thus, those Ip addresses are never coming back (for us). The net effect for 
> cassandra is that we'll leave thousands of dead entries in the 
> TSM.activeSocketSessions map. When I looked at an instance in a well-used 
> cluster yesterday, there were almost 400,000 entries in the map.

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