Elffuss BraidHub

kikocis/java-driver public

Remove heartbeat doc (merged in pooling section).
Changeset132f1f86c7d97f2dea4706561d2938541a35f23e452989bfc23090c34b757e8e
Authorolim7t <omichallat+github@gmail.com> · 2015-05-11 19:17 +02:00
Committerolim7t <omichallat+github@gmail.com> · 2015-05-11 19:17 +02:00
Parents1108322f3c72

Browse the files at this changeset

1 file changed

deleted features/heartbeat/README.md +0 −38
@@ -1,38 +0,0 @@
1-## Connection heartbeat
2-
3-If connections stay idle for too long, they might be dropped by
4-intermediate network devices (routers, firewalls...). Normally, TCP
5-keepalive should take care of this; but tweaking low-level keepalive
6-settings might be impractical in some environments.
7-
8-The driver provides application-side keepalive in the form of a
9-connection heartbeat: when a connection has been idle for a given amount
10-of time, the driver will simulate activity by writing a dummy request to
11-it.
12-
13-This feature is enabled by default. The default heartbeat interval is 30
14-seconds, it can be customized through `PoolingOptions`:
15-
16- cluster.getConfiguration().getPoolingOptions()
17- .setHeartbeatIntervalSeconds(60);
18-
19-This can be changed at runtime, but only connections created after that
20-will use the new interval. Most users will want to do this at startup:
21-
22- Cluster cluster = Cluster.builder()
23- .addContactPoint("127.0.0.1")
24- .withPoolingOptions(new PoolingOptions()
25- .setHeartbeatIntervalSeconds(60))
26- .build();
27-
28-The heartbeat interval should be set higher than
29-[SocketOptions.readTimeoutMillis](http://www.datastax.com/drivers/java/2.1/com/datastax/driver/core/SocketOptions.html#getReadTimeoutMillis()):
30-the read timeout is the maximum time that the driver waits for a regular
31-query to complete, therefore the connection should not be considered
32-idle before it has elapsed.
33-
34-To disable heartbeat, set the interval to 0.
35-
36-Implementation note: the dummy request sent by heartbeat is an
37-[OPTIONS](https://github.com/apache/cassandra/blob/trunk/doc/native_protocol_v3.spec#L278)
38-message.