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

nicu marasoiu commented on KAFKA-1282:
--------------------------------------

Hi, I am not completely sure I fully understood your solution in point 2: 

Do you mean to close at most one connection per iteration, right? This is ok, 
the worst case scenario is closing 100K old connections in 10 hours, one per 
select.

On storing the time to close in a local variable, the access of the oldest 
entry every iteration is O(1) super cheap so I would skip this optimization. 

> Disconnect idle socket connection in Selector
> ---------------------------------------------
>
>                 Key: KAFKA-1282
>                 URL: https://issues.apache.org/jira/browse/KAFKA-1282
>             Project: Kafka
>          Issue Type: Bug
>          Components: producer 
>    Affects Versions: 0.8.2
>            Reporter: Jun Rao
>            Assignee: Neha Narkhede
>              Labels: newbie++
>             Fix For: 0.9.0
>
>         Attachments: 
> KAFKA-1282_Disconnect_idle_socket_connection_in_Selector.patch, 
> idleDisconnect.patch
>
>
> To reduce # socket connections, it would be useful for the new producer to 
> close socket connections that are idle. We can introduce a new producer 
> config for the idle time.



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

Reply via email to