Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 9DAF7200CB0 for ; Fri, 9 Jun 2017 00:12:22 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 9C525160BE7; Thu, 8 Jun 2017 22:12:22 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id E1B3A160BD5 for ; Fri, 9 Jun 2017 00:12:21 +0200 (CEST) Received: (qmail 23794 invoked by uid 500); 8 Jun 2017 22:12:21 -0000 Mailing-List: contact dev-help@zookeeper.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@zookeeper.apache.org Delivered-To: mailing list dev@zookeeper.apache.org Received: (qmail 23778 invoked by uid 99); 8 Jun 2017 22:12:21 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd4-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 08 Jun 2017 22:12:20 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd4-us-west.apache.org (ASF Mail Server at spamd4-us-west.apache.org) with ESMTP id 729DFC06D2 for ; Thu, 8 Jun 2017 22:12:20 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd4-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -99.201 X-Spam-Level: X-Spam-Status: No, score=-99.201 tagged_above=-999 required=6.31 tests=[KAM_ASCII_DIVIDERS=0.8, RP_MATCHES_RCVD=-0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001, USER_IN_WHITELIST=-100] autolearn=disabled Received: from mx1-lw-us.apache.org ([10.40.0.8]) by localhost (spamd4-us-west.apache.org [10.40.0.11]) (amavisd-new, port 10024) with ESMTP id KS4jVlrE_aH2 for ; Thu, 8 Jun 2017 22:12:19 +0000 (UTC) Received: from mailrelay1-us-west.apache.org (mailrelay1-us-west.apache.org [209.188.14.139]) by mx1-lw-us.apache.org (ASF Mail Server at mx1-lw-us.apache.org) with ESMTP id 130605F6BE for ; Thu, 8 Jun 2017 22:12:19 +0000 (UTC) Received: from jira-lw-us.apache.org (unknown [207.244.88.139]) by mailrelay1-us-west.apache.org (ASF Mail Server at mailrelay1-us-west.apache.org) with ESMTP id 906EBE012F for ; Thu, 8 Jun 2017 22:12:18 +0000 (UTC) Received: from jira-lw-us.apache.org (localhost [127.0.0.1]) by jira-lw-us.apache.org (ASF Mail Server at jira-lw-us.apache.org) with ESMTP id 4557221E0C for ; Thu, 8 Jun 2017 22:12:18 +0000 (UTC) Date: Thu, 8 Jun 2017 22:12:18 +0000 (UTC) From: "ASF GitHub Bot (JIRA)" To: dev@zookeeper.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (ZOOKEEPER-1748) TCP keepalive for leader election connections MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Thu, 08 Jun 2017 22:12:22 -0000 [ https://issues.apache.org/jira/browse/ZOOKEEPER-1748?page=3Dcom.atlas= sian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=3D= 16043532#comment-16043532 ]=20 ASF GitHub Bot commented on ZOOKEEPER-1748: ------------------------------------------- Github user bensherman commented on the issue: https://github.com/apache/zookeeper/pull/276 =20 Version number fixed! > TCP keepalive for leader election connections > --------------------------------------------- > > Key: ZOOKEEPER-1748 > URL: https://issues.apache.org/jira/browse/ZOOKEEPER-1748 > Project: ZooKeeper > Issue Type: Improvement > Components: leaderElection > Affects Versions: 3.4.5, 3.5.0 > Environment: Linux, Java 1.7 > Reporter: Antal Sasv=C3=A1ri > Assignee: Daniel Peon > Priority: Minor > Fix For: 3.4.11 > > Attachments: Zookeeper-1748-add_tcp_keepalive.patch > > > In our system we encountered the following problem: > If the system is stable, and there is no leader election, the leader elec= tion port connections are open for very long time without any packets being= sent on them. > Some network elements silently drop the established TCP connection after = a timeout if there are no packets being sent on it. In this case the ZK ser= vers will not notice the connection loss. This causes additional delay late= r when the next leader election is started, as the TCP connections are not = alive any more. > We would like to be able to enable TCP keepalive on the leader election s= ockets in order to prevent the connection timeout in some network elements = due to connection inactivity. > This could be controlled by adding a new config parameter called tcpKeepA= live in the ZooKeeper configuration file. It would be only applicable in ca= se of algorithm 3 (TCP based fast leader election), having the default valu= e false. > If tcpKeepAlive is set to true, the TCP keepalive flag should be enabled = for the leader election sockets in QuorumCnxManager.setSockOpts() by callin= g sock.setKeepAlive(true). > We have tested this change successfully in our environment. > Please comment whether you see any problem with this. If not, I am going = to submit a patch. > I've been told that e.g. Apache ActiveMQ also has a config option for sim= ilar purpose called transport.keepalive. -- This message was sent by Atlassian JIRA (v6.3.15#6346)