From dev-return-31554-archive-asf-public=cust-asf.ponee.io@ignite.apache.org Thu Mar 1 15:06:20 2018 Return-Path: X-Original-To: archive-asf-public@cust-asf.ponee.io Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by mx-eu-01.ponee.io (Postfix) with SMTP id 2E84618064D for ; Thu, 1 Mar 2018 15:06:20 +0100 (CET) Received: (qmail 39986 invoked by uid 500); 1 Mar 2018 14:06:19 -0000 Mailing-List: contact dev-help@ignite.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@ignite.apache.org Delivered-To: mailing list dev@ignite.apache.org Received: (qmail 39973 invoked by uid 99); 1 Mar 2018 14:06:18 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd1-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 01 Mar 2018 14:06:18 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd1-us-west.apache.org (ASF Mail Server at spamd1-us-west.apache.org) with ESMTP id 08AA2C2B51 for ; Thu, 1 Mar 2018 14:06:18 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd1-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 3.192 X-Spam-Level: *** X-Spam-Status: No, score=3.192 tagged_above=-999 required=6.31 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, HTML_MESSAGE=2, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, SPF_PASS=-0.001, URI_HEX=1.313] autolearn=disabled Authentication-Results: spamd1-us-west.apache.org (amavisd-new); dkim=pass (2048-bit key) header.d=gmail.com Received: from mx1-lw-us.apache.org ([10.40.0.8]) by localhost (spamd1-us-west.apache.org [10.40.0.7]) (amavisd-new, port 10024) with ESMTP id WjHk9ugkI5Wx for ; Thu, 1 Mar 2018 14:06:14 +0000 (UTC) Received: from mail-qt0-f174.google.com (mail-qt0-f174.google.com [209.85.216.174]) by mx1-lw-us.apache.org (ASF Mail Server at mx1-lw-us.apache.org) with ESMTPS id D65DC5F17F for ; Thu, 1 Mar 2018 14:06:13 +0000 (UTC) Received: by mail-qt0-f174.google.com with SMTP id g60so7597605qtd.11 for ; Thu, 01 Mar 2018 06:06:13 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to; bh=OwafL1JEFQSZDp9kj3oD2TCQWC7DLqIm3twwFLyZWNM=; b=k0NYzWUgLtBSzTcli2t2iZZO9uU15WB8cDipbiNFuv1gF2RVz/OV81LvxR3RHVjolY 3lkTYMAOgClv+hfLpQJPwxQMyi+75YCKJcFiER+gB8B1XK1ouHc7TgqFbnIlwLERubcQ eptK2fNkSTi3OA4AYle2Gd2ESUOkFXTjY3Kbj8ugMnA1a+J39i4Euco2Ig43XTHlzMAX SQHh5UhFfcWeC3nQxkNkVKuUa3zXjAuXaZey6dX3qbB8qMEeFUfL4UgMA3rwqPqmwIcu t2PYnKIS/R1ayUDUeBVbbmhjeRNYPHpe9jVKZ6J5KqWTEozEIFi7R5zuoA7EY0onHPXQ Ldag== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to; bh=OwafL1JEFQSZDp9kj3oD2TCQWC7DLqIm3twwFLyZWNM=; b=gahk6IHBZuF0RvhFm70G9iwNbTRt9ytUFC3Ro2AH7KHj3cixd2SFQVSj12lx/f9rvX 2pXlpo5NqBB1zFD0WaZBETalVb+FcVAPek1pYoGlldXrZky/LVnbDb1yBpszStBYJy4K QeGPErCwe580xTWaZcTvkfsEGJPklw+xjgy7uHkwbdKpcQSGxzfbXt+vXRcLwUOrZWU0 EWtK4GKIkyXktQZs8CKF1Jwz7jZVaaRkY99I2a296JfTCer0RLZRzFGF6+dkUuhxWTG8 VBBv6fCJVZlo5KqeqUzOJ6NsH+GbK87hmUZuUlygNPQbWUeSW48l0cV9Cx78elLkE+Ve ftng== X-Gm-Message-State: AElRT7FTb9L5axyMLKNtWp6CV2oml4wc6Glj9rJ5aKAmJchMd7UZkdBF rKsBdhCl5+TKtbTXl0G2wFlFKgmYWJfxTqM+KmrwZA== X-Google-Smtp-Source: AG47ELu8IEoyvup25HC+tihWd3ZzJ8B+h7+sAeFkf/bona+x3XpDOoGPjegeWNUhBReeNwKLkyz5z9uFTxPgHxAD3sQ= X-Received: by 10.237.40.67 with SMTP id r61mr3136899qtd.233.1519913173383; Thu, 01 Mar 2018 06:06:13 -0800 (PST) MIME-Version: 1.0 Received: by 10.200.63.92 with HTTP; Thu, 1 Mar 2018 06:06:12 -0800 (PST) In-Reply-To: <1519912902858-0.post@n4.nabble.com> References: <1519912902858-0.post@n4.nabble.com> From: Ilya Kasnacheev Date: Thu, 1 Mar 2018 17:06:12 +0300 Message-ID: Subject: Re: IgniteConfiguration, TcpDiscoverySpi, TcpCommunicationSpi timeouts To: dev@ignite.apache.org Content-Type: multipart/alternative; boundary="94eb2c067320c9fdd805665a5c7e" --94eb2c067320c9fdd805665a5c7e Content-Type: text/plain; charset="UTF-8" I agree with you. I think we could restrict usage of e.g. setConnectTimeout/setSocketTimeout to people extending SPIs, since different implementations may need different values. However, for user configurations we should only expose timeouts we can explain, everything else should have reasonable values. -- Ilya Kasnacheev 2018-03-01 17:01 GMT+03:00 Alexey Popov : > Hi Igniters, > > We often see similar questions from users and customers related to > IgniteConfiguration, TcpDiscoverySpi, TcpCommunicationSpi timeouts and > their > relations. And we see several side-effects after incorrect timeout > configuration. > > I tried to briefly describe these timeout settings (please see below) and > found out that the most of them do not have sense in terms of cluster > functions/operations and could not be explained to the users. > > I propose to deprecate most of them and leave only the timeouts we can > explain in common terms ( (setFailureDetectionTimeout, setNetworkTimeout, > setJoinTimeout and some others). > > Please let me know your thoughts. > > Thanks, > Alexey > > GLOBAL: > > IgniteConfiguration.setNetworkTimeout: > It is a global timeout for high-level operations where a network is > involved. For instance, IgniteMessaging delivery uses this timeout or > DiscoverySpi handshake. > > IgniteConfiguration.setFailureDetectionTimeout: > It is a global timeout for detecting failures at IgniteSpi implementations > (including DiscoverySpi and CommunicationSpi). > The failure detection algorithm actually limits a range of simple network > operations related to a single logical operation (for instance, a reliable > delivery of some DiscoverySpi message within a cluster). > Failure detection timeout is a cumulative timeout for a socket connection, > sending and receiving data bytes and all possible socket retries (if some > failure happens). > This timeout is intended to simplify the failure detection condition from a > user perspective. > > IgniteConfiguration.setClientFailureDetectionTimeout: - it is a special > case > for DiscoverySpi client-node Ignite. > > TCP DISCOVERY SPI: > > If you need more control over failure detection algorithm for > TcpDiscoverySpi you can explicitly use the following low-level options > (that > will disable failureDetectoinTimeout logic): > > 1. TcpDiscoverySpi.setConnectTimeout - socket connection timeout > 2. TcpDiscoverySpi.setReconnectCount - number of reconnect attempts used > when establishing connection with the remote node and sending messages to > it > 3. TcpDiscoverySpi.setSocketTimeout - socket write timeout. The write > operation will be repeated getReconnectCount() times if it exceeds this > timeout > 4. TcpDiscoverySpi.setAckTimeout - message acknowledgment timeout. If a > message acknowledgment is not received within this timeout, sending is > considered as failed and SPI will try to repeat send operation. It is > automatically doubled for simultaneous retries up to getMaxAckTimeout > value. > 5. TcpDiscoverySpi.setMaxAckTimeout - maximum connection timeout, if the > getAckTimeout reaches getMaxAckTimeout then SPI give up sending retries > > Another important TcpDiscoverySpi timeouts: > > TcpDiscoverySpi.setJoinTimeout - It is a timeout for join process when a > new/restarted node joins a cluster. The node tries to connect to all > available IP addresses provided by ipFinder within this timeout. > If the timeout is exceeded, the node will give up and throw an exception > from Ignition.start(). > > TcpDiscoverySpi.setNetworkTimeout - timeout for high-level operations like > handshake. It looks like it should be deprecated and the > IgniteConfiguration.getNetworkTimeout should be used here. > > TCP COMMUNICATION SPI: > > If you need more control over failure detection algorithm for > TcpCommunicationSpi you can explicitly use the following low-level options > (that will disable failureDetectoinTimeout logic): > > 1. TcpCommunicationSpi.setConnectTimeout - socket connection timeout, will > be automatically doubled for simultaneous retries (up to getReconnectCount) > related to a single logical operation > 2. TcpCommunicationSpi.setMaxConnectTimeout - maximum connection timeout, > the higher limit of getReconnectCount-times doubled getConnectTimeout > 3. TcpCommunicationSpi.setReconnectCount - number of reconnect attempts > used > when establishing connection with the remote node and sending messages to > it > > Another important TcpCommunicationSpi timeouts: > > TcpDiscoverySpi.setSocketWriteTimeout - timeout to send a message. > TcpDiscoverySpi.setIdleConnectionTimeout - maximum idle connection timeout > upon which a connection will be closed. > > > > > -- > Sent from: http://apache-ignite-developers.2346864.n4.nabble.com/ > --94eb2c067320c9fdd805665a5c7e--