You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@kafka.apache.org by "Guozhang Wang (JIRA)" <ji...@apache.org> on 2013/09/13 23:34:52 UTC

[jira] [Commented] (KAFKA-1043) Time-consuming FetchRequest could block other request in the response queue

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

Guozhang Wang commented on KAFKA-1043:
--------------------------------------

One possible approach would be adding a timer to the Send trait, and add one more parameter for the writeTo function as the max time for a single write to the socket buffer. When the time threshold has reached force the writeTo function to return.

An alternative approach would be to make the SocketServer's Acceptor smarter than doing round-robin to assign requests so that incoming new requests would be assign to processors that has shorter response queue. I think we do not need to change SocketServer to response queue-aware but just write a pluggable acceptor interface would be fine. The cons of this approach is that requests that have already been assigned to the blocked processor would still suffer from the delay, but future requests would be assigned to other processors.
                
> Time-consuming FetchRequest could block other request in the response queue
> ---------------------------------------------------------------------------
>
>                 Key: KAFKA-1043
>                 URL: https://issues.apache.org/jira/browse/KAFKA-1043
>             Project: Kafka
>          Issue Type: Bug
>    Affects Versions: 0.8.1
>            Reporter: Guozhang Wang
>            Assignee: Guozhang Wang
>             Fix For: 0.8, 0.8.1
>
>
> Since in SocketServer the processor who takes any request is also responsible for writing the response for that request, we make each processor owning its own response queue. If a FetchRequest takes irregularly long time to write the channel buffer it would block all other responses in the queue.

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