Skip to content

Commit fa4eebf

Browse files
Expand heartbeats guide to cover some of the commonly asked questions
1 parent f25c817 commit fa4eebf

File tree

2 files changed

+37
-5
lines changed

2 files changed

+37
-5
lines changed

site/heartbeats.xml

Lines changed: 34 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33
Copyright (c) 2007-2016 Pivotal Software, Inc.
44
55
All rights reserved. This program and the accompanying materials
6-
are made available under the terms of the under the Apache License,
7-
Version 2.0 (the "License”); you may not use this file except in compliance
6+
are made available under the terms of the under the Apache License,
7+
Version 2.0 (the "License”); you may not use this file except in compliance
88
with the License. You may obtain a copy of the License at
99
1010
http://www.apache.org/licenses/LICENSE-2.0
@@ -102,6 +102,26 @@ cf.RequestedHeartbeat = 60;
102102
</pre>
103103
</doc:section>
104104

105+
<doc:section name="false-positives">
106+
<doc:heading>Low Timeout Values and False Positives</doc:heading>
107+
<p>
108+
Setting heartbeat timeout value too low can lead to false
109+
positives (peer being considered unavailable while it really
110+
isn't the case) due to transient network congestion,
111+
short-lived server flow control, and so on.
112+
113+
This should be taken into consideration when picking a timeout
114+
value.
115+
</p>
116+
<p>
117+
Several years worth of feedback from the users and client
118+
library maintainers suggest that values lower than 5 seconds
119+
are fairly likely to cause false positives, and values of 1
120+
second or lower are very likely to do so. Values within the 5
121+
to 20 seconds range are optimal for most environments.
122+
</p>
123+
</doc:section>
124+
105125
<doc:section name="stomp">
106126
<doc:heading>Heartbeats in STOMP</doc:heading>
107127
<p>
@@ -114,5 +134,17 @@ cf.RequestedHeartbeat = 60;
114134
</p>
115135
</doc:section>
116136

137+
<doc:section name="shovel-and-federation">
138+
<doc:heading>Heartbeats in Shovel and Federation Plugins</doc:heading>
139+
<p>
140+
<a href="/shovel.html">Shovel</a> and <a href="/federation.html">Federation</a> plugins open Erlang client
141+
connections to RabbitMQ nodes under the hood. As such, they can be configured
142+
to use a desired heartbeat value.
143+
</p>
144+
<p>
145+
Please refer to the <a href="/uri-query-parameters.html">AMQP 0-9-1 URI query parameters reference</a>
146+
for details.
147+
</p>
148+
</doc:section>
117149
</body>
118150
</html>

site/uri-query-parameters.xml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -111,15 +111,15 @@ limitations under the License.
111111
<tr>
112112
<td><code>heartbeat</code></td>
113113
<td>
114-
<a href="/heartbeats.html">Heartbeat</a> value (in seconds)
114+
<a href="/heartbeats.html">Heartbeat</a> timeout value in seconds (an integer)
115115
to negotiate with the server.
116116
</td>
117117
</tr>
118118
<tr>
119119
<td><code>connection_timeout</code></td>
120120
<td>
121-
Time (in seconds) to wait while establishing a connection
122-
before giving up.
121+
Time in seconds (an integer) to wait while establishing a TCP connection
122+
to the server before giving up.
123123
</td>
124124
</tr>
125125
<tr>

0 commit comments

Comments
 (0)