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

Sudheesh Katkam commented on DRILL-5218:
----------------------------------------

Are heartbeats beneficial? I guess so (thanks to [~parthc] for pointing me to 
[this 
article|http://blog.stephencleary.com/2009/05/detection-of-half-open-dropped.html]).
 But if heartbeats are disabled, the client does not know if the connection is 
alive, but the next message to the server would fail, and the client could 
reconnect, and if that fails, the client knows something is really wrong. If 
the query execution is taking too long, the server could send the status of a 
query once a while (which is different from heartbeats during idle time).

Is the heartbeat mechanism implemented correctly? I don't think so, I read [an 
article| http://250bpm.com/blog:22] that explains what is required to implement 
heartbeats correctly, and Drill does not meet the checklist.

{quote}
...
Thus, when you are evaluating a solution that implements heartbeating on top of 
TCP here is a checklist to help you to find out whether it actually works:

1. If there are heartbeats but there's no flow control, the solution won't work.
2. There must be a way to split larger messages into smaller units that will 
fit into the preallocated buffer. If there's no such mechanism, the solution 
won't work.
3. The credit in the flow-control mechanism must be expressed in terms of 
bytes, not messages. If it uses number of messages to control the flow, the 
solution won't work.
4. If the protocol allows to issue more credit than the space available in the 
receive buffer, the solution won't work.
...
{quote}

Until all issues (including DRILL-5217) are resolved, I suggest providing an 
option per connection to disable heartbeats. Fair?

> Support Disabling Heartbeats in C++ Client
> ------------------------------------------
>
>                 Key: DRILL-5218
>                 URL: https://issues.apache.org/jira/browse/DRILL-5218
>             Project: Apache Drill
>          Issue Type: Bug
>          Components: Client - C++
>            Reporter: Sudheesh Katkam
>            Assignee: Sudheesh Katkam
>
> Heartbeats between bits allow for detecting health of remotes, but heartbeats 
> between client and bit may not be necessary? So allow to (at least) disable 
> heartbeats between C++ client and bit.



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

Reply via email to