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

Joe McDonnell commented on IMPALA-13253:
----------------------------------------

The AWS LB has an idle time limit of 350 seconds that does not explicitly 
notify either end that the connection is dead: 
[https://aws.amazon.com/blogs/networking-and-content-delivery/introducing-configurable-idle-timeout-for-connection-tracking/]

The libkeepalive library can be used to force a program to use TCP keepalive 
without needing to recompile it: 
[https://tldp.org/HOWTO/TCP-Keepalive-HOWTO/addsupport.html]

Testing using libkeepalive and iptables shows that it behaves as expected: It 
can handle situations where packets are dropped or rejected. In a cluster that 
uses the AWS LB, this can be set to have a keepalive time of 400 seconds to 
very quickly detect and close connections that AWS LB considers idle.

I think keepalive should be on by default.

> Add option to use TCP keepalives for client connections
> -------------------------------------------------------
>
>                 Key: IMPALA-13253
>                 URL: https://issues.apache.org/jira/browse/IMPALA-13253
>             Project: IMPALA
>          Issue Type: Task
>          Components: Backend, Clients
>    Affects Versions: Impala 4.5.0
>            Reporter: Joe McDonnell
>            Priority: Blocker
>
> A client can be disconnected without explicitly closing its TCP connection. 
> This can happen if the client machine resets or there is a network 
> disruption. In particular, load balancers can have an idle time that results 
> in a connection becoming invalid. Impala can't really guarantee that the 
> client will properly tear down its connection and the Impala side resources 
> will be released.
> TCP keepalive would allow Impala to detect dead clients and close the 
> connection. It also can prevent a load balancer from seeing the connection as 
> idle. This can be important for clients that hold connections in a pool.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to