ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sboi...@apache.org
Subject [06/16] incubator-ignite git commit: # changed defaults for discovery
Date Fri, 19 Jun 2015 09:10:04 GMT
# changed defaults for discovery


Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/5011c2b5
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/5011c2b5
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/5011c2b5

Branch: refs/heads/ignite-980
Commit: 5011c2b5e9671ced95e21f122c2e5ef9102c19fe
Parents: b23ea74
Author: Yakov Zhdanov <yzhdanov@gridgain.com>
Authored: Thu Jun 18 14:50:43 2015 +0300
Committer: Yakov Zhdanov <yzhdanov@gridgain.com>
Committed: Thu Jun 18 14:50:43 2015 +0300

----------------------------------------------------------------------
 .../communication/tcp/TcpCommunicationSpi.java  |  6 ++--
 .../spi/discovery/tcp/TcpDiscoverySpi.java      | 32 +++++++++++++-------
 2 files changed, 24 insertions(+), 14 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/5011c2b5/modules/core/src/main/java/org/apache/ignite/spi/communication/tcp/TcpCommunicationSpi.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/spi/communication/tcp/TcpCommunicationSpi.java
b/modules/core/src/main/java/org/apache/ignite/spi/communication/tcp/TcpCommunicationSpi.java
index 9e38788..fc504f4 100644
--- a/modules/core/src/main/java/org/apache/ignite/spi/communication/tcp/TcpCommunicationSpi.java
+++ b/modules/core/src/main/java/org/apache/ignite/spi/communication/tcp/TcpCommunicationSpi.java
@@ -174,8 +174,8 @@ public class TcpCommunicationSpi extends IgniteSpiAdapter
     /** Default socket send and receive buffer size. */
     public static final int DFLT_SOCK_BUF_SIZE = 32 * 1024;
 
-    /** Default connection timeout (value is <tt>1000</tt>ms). */
-    public static final long DFLT_CONN_TIMEOUT = 1000;
+    /** Default connection timeout (value is <tt>5000</tt>ms). */
+    public static final long DFLT_CONN_TIMEOUT = 5000;
 
     /** Default Maximum connection timeout (value is <tt>600,000</tt>ms). */
     public static final long DFLT_MAX_CONN_TIMEOUT = 10 * 60 * 1000;
@@ -680,7 +680,7 @@ public class TcpCommunicationSpi extends IgniteSpiAdapter
 
     /** Recovery and idle clients handler. */
     private CommunicationWorker commWorker;
-    
+
     /** Shared memory accept worker. */
     private ShmemAcceptWorker shmemAcceptWorker;
 

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/5011c2b5/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/TcpDiscoverySpi.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/TcpDiscoverySpi.java
b/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/TcpDiscoverySpi.java
index e4ef744..9a26867 100644
--- a/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/TcpDiscoverySpi.java
+++ b/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/TcpDiscoverySpi.java
@@ -21,7 +21,6 @@ import org.apache.ignite.*;
 import org.apache.ignite.cluster.*;
 import org.apache.ignite.configuration.*;
 import org.apache.ignite.internal.*;
-import org.apache.ignite.internal.util.*;
 import org.apache.ignite.internal.util.io.*;
 import org.apache.ignite.internal.util.tostring.*;
 import org.apache.ignite.internal.util.typedef.*;
@@ -66,6 +65,17 @@ import java.util.concurrent.atomic.*;
  * and then this info goes to coordinator. When coordinator processes join request
  * and issues node added messages and all other nodes then receive info about new node.
  * <h1 class="header">Configuration</h1>
+ * <h2 class="header">Important Notice</h2>
+ * Configuration defaults are chosen to make possible for discovery SPI to reliably work
on
+ * most of hardware and virtual deployments, but this has made failure detection time worse.
+ * <p>
+ * For stable low-latency networks the following more aggressive settings are recommended
+ * (which allows failure detection time ~200ms):
+ * <ul>
+ * <li>Heartbeat frequency (see {@link #setHeartbeatFrequency(long)}) - 100ms</li>
+ * <li>Socket timeout (see {@link #setSocketTimeout(long)}) - 200ms</li>
+ * <li>Message acknowledgement timeout (see {@link #setAckTimeout(long)}) - 50ms</li>
+ * </ul>
  * <h2 class="header">Mandatory</h2>
  * There are no mandatory configuration parameters.
  * <h2 class="header">Optional</h2>
@@ -164,23 +174,23 @@ public class TcpDiscoverySpi extends IgniteSpiAdapter implements DiscoverySpi,
T
     /** Default value for thread priority (value is <tt>10</tt>). */
     public static final int DFLT_THREAD_PRI = 10;
 
-    /** Default heartbeat messages issuing frequency (value is <tt>100ms</tt>).
*/
-    public static final long DFLT_HEARTBEAT_FREQ = 100;
+    /** Default heartbeat messages issuing frequency (value is <tt>2000ms</tt>).
*/
+    public static final long DFLT_HEARTBEAT_FREQ = 2000;
 
     /** Default size of topology snapshots history. */
     public static final int DFLT_TOP_HISTORY_SIZE = 1000;
 
-    /** Default socket operations timeout in milliseconds (value is <tt>200ms</tt>).
*/
-    public static final long DFLT_SOCK_TIMEOUT = 200;
+    /** Default socket operations timeout in milliseconds (value is <tt>5000ms</tt>).
*/
+    public static final long DFLT_SOCK_TIMEOUT = 5000;
 
-    /** Default timeout for receiving message acknowledgement in milliseconds (value is <tt>50ms</tt>).
*/
-    public static final long DFLT_ACK_TIMEOUT = 50;
+    /** Default timeout for receiving message acknowledgement in milliseconds (value is <tt>5000ms</tt>).
*/
+    public static final long DFLT_ACK_TIMEOUT = 5000;
 
-    /** Default socket operations timeout in milliseconds (value is <tt>700ms</tt>).
*/
-    public static final long DFLT_SOCK_TIMEOUT_CLIENT = 700;
+    /** Default socket operations timeout in milliseconds (value is <tt>5000ms</tt>).
*/
+    public static final long DFLT_SOCK_TIMEOUT_CLIENT = 5000;
 
-    /** Default timeout for receiving message acknowledgement in milliseconds (value is <tt>700ms</tt>).
*/
-    public static final long DFLT_ACK_TIMEOUT_CLIENT = 700;
+    /** Default timeout for receiving message acknowledgement in milliseconds (value is <tt>5000ms</tt>).
*/
+    public static final long DFLT_ACK_TIMEOUT_CLIENT = 5000;
 
     /** Default reconnect attempts count (value is <tt>10</tt>). */
     public static final int DFLT_RECONNECT_CNT = 10;


Mime
View raw message