]> git.ipfire.org Git - thirdparty/kea.git/commitdiff
[5484] Documentation updated.
authorTomek Mrugalski <tomasz@isc.org>
Wed, 7 Mar 2018 12:50:04 +0000 (13:50 +0100)
committerTomek Mrugalski <tomasz@isc.org>
Wed, 7 Mar 2018 12:50:04 +0000 (13:50 +0100)
doc/examples/kea4/cassandra.json
doc/examples/kea6/cassandra.json
doc/guide/dhcp4-srv.xml
doc/guide/dhcp6-srv.xml

index 7f28e598b69508fb7882172f490c6b9935f7840f..a827c9f63ee6d023efa3d1bc35a2e0d4653d8b75 100644 (file)
       "type": "cql",
       "keyspace": "keatest",
       "contact-points": "192.0.2.1,192.0.2.2,192.0.2.3",
-      "port": 9042
+      "port": 9042,
+
+      // Cassandra supports many additonal parameters that are typically
+      // not needed, but may be used to tweak your deployment.
+
+      // This parameter governs how long Kea waits before attempting
+      // to reconnect. Expressed in milliseconds. The default is 2000 [ms].
+      "reconnect-wait-time": 2000,
+
+      // This parameter sets the timeout for connecting to a node. Expressed
+      // in milliseconds. The default is 5000 [ms].
+      "connect-timeout": 5000,
+
+      // This parameter sets the timeout for waiting for a response
+      // from a node. Expressed in milliseconds. The default is 12000 [ms].
+      "request-timeout": 12000,
+
+      // This parameter governs the TCP keep-alive mechanism. Expressed
+      // in seconds of delay. The default is disabled.
+      "tcp-keepalive": 1,
+
+      // This parameter enables/disables Nagle's algorithm on connections.
+      // The default is true.
+      "tcp-nodelay": true
   },
 
 // Addresses will be assigned with a lifetime of 4000 seconds.
index 5757ca73cca372dce6535680a29285baa2e508d8..617c713b89c745378b36207daed38d50976446dc 100644 (file)
       "type": "cql",
       "keyspace": "keatest",
       "contact-points": "192.0.2.1,192.0.2.2,192.0.2.3",
-      "port": 9042
+      "port": 9042,
+
+      // Cassandra supports many additonal parameters that are typically
+      // not needed, but may be used to tweak your deployment.
+
+      // This parameter governs how long Kea waits before attempting
+      // to reconnect. Expressed in milliseconds. The default is 2000 [ms].
+      "reconnect-wait-time": 2000,
+
+      // This parameter sets the timeout for connecting to a node. Expressed
+      // in milliseconds. The default is 5000 [ms].
+      "connect-timeout": 5000,
+
+      // This parameter sets the timeout for waiting for a response
+      // from a node. Expressed in milliseconds. The default is 12000 [ms].
+      "request-timeout": 12000,
+
+      // This parameter governs the TCP keep-alive mechanism. Expressed
+      // in seconds of delay. The default is disabled.
+      "tcp-keepalive": 1,
+
+      // This parameter enables/disables Nagle's algorithm on connections.
+      // The default is true.
+      "tcp-nodelay": true
   },
 
 // Addresses will be assigned with preferred and valid lifetimes
index b06324f4b1d86813413b7c114d35c2f7b4753448..ce3dc318a73c9582839e6b56a3e9fb27b04593d7 100644 (file)
@@ -460,19 +460,13 @@ be followed by a comma and another object definition.</para>
 <screen>
 "Dhcp4": { "lease-database": { <userinput>"host": "<replaceable>remote-host-name</replaceable>"</userinput>, ... }, ... }
 </screen>
-  For Cassandra, multiple contact points can be provided:
-<screen>
-"Dhcp4": { "lease-database": { <userinput>"contact-points": "<replaceable>remote-host-name[, ...] </replaceable>"</userinput>, ... }, ... }
-</screen>
+
   The usual state of affairs will be to have the database on the same machine as
   the DHCPv4 server.  In this case, set the value to the empty string:
 <screen>
 "Dhcp4": { "lease-database": { <userinput>"host" : ""</userinput>, ... }, ... }
 </screen>
-  For Cassandra:
-<screen>
-"Dhcp4": { "lease-database": { <userinput>"contact-points": ""</userinput>, ... }, ... }
-</screen>
+
   Should the database use a port different than default, it may be
   specified as well:
 <screen>
@@ -487,16 +481,6 @@ The default value of five seconds should be more than adequate for local connect
 If a timeout is given though, it should be an integer greater than zero.
   </para>
 
-  <para>
-    Note that host parameter is used by MySQL and PostgreSQL
-    backends. Cassandra has a concept of contact points that could be
-    used to contact the cluster, instead of a single IP or
-    hostname. It takes a list of comma separated IP addresses. This may be specified as:
-<screen>
-"Dhcp4": { "lease-database": { <userinput>"contact-points" : "192.0.2.1,192.0.2.2"</userinput>, ... }, ... }
-</screen>
-  </para>
-
   <para>Finally, the credentials of the account under which the server will
   access the database should be set:
 <screen>
@@ -508,6 +492,82 @@ If a timeout is given though, it should be an integer greater than zero.
   If there is no password to the account, set the password to the empty string
   "". (This is also the default.)</para>
 </section>
+
+<section xml:id="cassandra-database-configuration4">
+  <title>Cassandra specific parameters</title>
+  <para>
+    Cassandra backend is configured slightly differently. Cassandra has a
+    concept of contact points that could be used to contact the cluster,
+    instead of a single IP or hostname. It takes a list of comma separated IP
+    addresses. This may be specified as:
+    <screen>
+"Dhcp4": {
+    "lease-database": {
+        <userinput>"contact-points": "<replaceable>ip-address1, ip-address2 [,...]</replaceable>"</userinput>,
+        ...
+    },
+    ...
+}</screen>
+  </para>
+
+  <para>
+    Cassandra also supports a number of optional parameters:
+    <itemizedlist>
+
+      <listitem><simpara>
+        <command>reconnect-wait-time</command> - governs how long Kea waits
+        before attempting to reconnect. Expressed in milliseconds. The default
+        is 2000 [ms].
+      </simpara></listitem>
+
+      <listitem><simpara>
+        <command>connect-timeout</command> - sets the timeout for connecting to
+        a node. Expressed in milliseconds. The default is 5000 [ms].
+      </simpara></listitem>
+
+      <listitem><simpara>
+        <command>request-timeout</command> - this parameter sets the timeout for
+        waiting for a response from a node. Expressed in milliseconds. The
+        default is 12000 [ms].
+      </simpara></listitem>
+
+      <listitem><simpara>
+        <command>tcp-keepalive</command> - This parameter governs the TCP
+        keep-alive mechanism. Expressed in seconds of delay. If the parameter
+        is not present, the mechanism is disabled.
+      </simpara></listitem>
+
+      <listitem><simpara>
+        <command>tcp-nodelay</command> - This parameter enables/disabled Nagle's
+        algorithm on connections. The default is true.
+      </simpara></listitem>
+
+    </itemizedlist>
+  </para>
+
+  <para>
+    For example, a complex Cassandra configuration with most parameters specified
+    could look as follows:
+<screen>
+"Dhcp4": {
+  "lease-database": {
+      "type": "cql",
+      "keyspace": "keatest",
+      "contact-points": "192.0.2.1, 192.0.2.2, 192.0.2.3",
+      "port": 9042,
+      "reconnect-wait-time": 2000,
+      "connect-timeout": 5000,
+      "request-timeout": 12000,
+      "tcp-keepalive": 1,
+      "tcp-nodelay": true
+    },
+    ...
+}</screen>
+
+Similar parameters can be specified for hosts database.
+  </para>
+</section>
+
 </section>
 
 <section xml:id="hosts4-storage">
@@ -572,6 +632,10 @@ If a timeout is given though, it should be an integer greater than zero.
 </screen>
   If there is no password to the account, set the password to the empty string
   "". (This is also the default.)</para>
+
+  <para>For additional Cassandra specific parameters, see <xref
+  linkend="cassandra-database-configuration4"/>.</para>
+
 </section>
 
 <section xml:id="read-only-database-configuration4">
index c974e0b3ce08187d7d656d8a2dd25a9d59cb24f8..26cb9d5ca3c334782829d7d8c7aeb80b27eb98b0 100644 (file)
@@ -503,6 +503,13 @@ If a timeout is given though, it should be an integer greater than zero.
   If there is no password to the account, set the password to the empty string
   "". (This is also the default.)</para>
 </section>
+
+<section xml:id="cassandra-database-configuration6">
+    <title>Cassandra specific parameters</title>
+<para>The parameters are the same for DHCPv4 and DHCPv6. See <xref
+linkend="cassandra-database-configuration4"/> for details.</para>
+</section>
+
 </section>
 
 <section xml:id="hosts6-storage">
@@ -565,6 +572,10 @@ If a timeout is given though, it should be an integer greater than zero.
 </screen>
   If there is no password to the account, set the password to the empty string
   "". (This is also the default.)</para>
+
+  <para>
+    For additional Cassandra specific parameters, see <xref
+    linkend="cassandra-database-configuration4" />.</para>
 </section>
 
 <section xml:id="read-only-database-configuration6">