From: Tomek Mrugalski Date: Wed, 7 Mar 2018 12:50:04 +0000 (+0100) Subject: [5484] Documentation updated. X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4836fceb799544fb4f3c70d21e52ab7a402b2bc8;p=thirdparty%2Fkea.git [5484] Documentation updated. --- diff --git a/doc/examples/kea4/cassandra.json b/doc/examples/kea4/cassandra.json index 7f28e598b6..a827c9f63e 100644 --- a/doc/examples/kea4/cassandra.json +++ b/doc/examples/kea4/cassandra.json @@ -22,7 +22,30 @@ "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. diff --git a/doc/examples/kea6/cassandra.json b/doc/examples/kea6/cassandra.json index 5757ca73cc..617c713b89 100644 --- a/doc/examples/kea6/cassandra.json +++ b/doc/examples/kea6/cassandra.json @@ -21,7 +21,30 @@ "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 diff --git a/doc/guide/dhcp4-srv.xml b/doc/guide/dhcp4-srv.xml index b06324f4b1..ce3dc318a7 100644 --- a/doc/guide/dhcp4-srv.xml +++ b/doc/guide/dhcp4-srv.xml @@ -460,19 +460,13 @@ be followed by a comma and another object definition. "Dhcp4": { "lease-database": { "host": "remote-host-name", ... }, ... } - For Cassandra, multiple contact points can be provided: - -"Dhcp4": { "lease-database": { "contact-points": "remote-host-name[, ...] ", ... }, ... } - + 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: "Dhcp4": { "lease-database": { "host" : "", ... }, ... } - For Cassandra: - -"Dhcp4": { "lease-database": { "contact-points": "", ... }, ... } - + Should the database use a port different than default, it may be specified as well: @@ -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. - - 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: - -"Dhcp4": { "lease-database": { "contact-points" : "192.0.2.1,192.0.2.2", ... }, ... } - - - Finally, the credentials of the account under which the server will access the database should be set: @@ -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.) + +
+ Cassandra specific parameters + + 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: + +"Dhcp4": { + "lease-database": { + "contact-points": "ip-address1, ip-address2 [,...]", + ... + }, + ... +} + + + + Cassandra also supports a number of optional parameters: + + + + reconnect-wait-time - governs how long Kea waits + before attempting to reconnect. Expressed in milliseconds. The default + is 2000 [ms]. + + + + connect-timeout - sets the timeout for connecting to + a node. Expressed in milliseconds. The default is 5000 [ms]. + + + + request-timeout - this parameter sets the timeout for + waiting for a response from a node. Expressed in milliseconds. The + default is 12000 [ms]. + + + + tcp-keepalive - This parameter governs the TCP + keep-alive mechanism. Expressed in seconds of delay. If the parameter + is not present, the mechanism is disabled. + + + + tcp-nodelay - This parameter enables/disabled Nagle's + algorithm on connections. The default is true. + + + + + + + For example, a complex Cassandra configuration with most parameters specified + could look as follows: + +"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 + }, + ... +} + +Similar parameters can be specified for hosts database. + +
+
@@ -572,6 +632,10 @@ 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.) + + For additional Cassandra specific parameters, see . +
diff --git a/doc/guide/dhcp6-srv.xml b/doc/guide/dhcp6-srv.xml index c974e0b3ce..26cb9d5ca3 100644 --- a/doc/guide/dhcp6-srv.xml +++ b/doc/guide/dhcp6-srv.xml @@ -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.)
+ +
+ Cassandra specific parameters +The parameters are the same for DHCPv4 and DHCPv6. See for details. +
+
@@ -565,6 +572,10 @@ 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.) + + + For additional Cassandra specific parameters, see .