You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
| Cluster internal traffic | `6000` | `xref:configuration/configuration-settings.adoc#config_server.cluster.advertised_address[server.cluster.advertised_address]` is used for the discovery service v2 since Neo4j 5.23. See xref:clustering/setup/discovery.adoc[] for more details.
| Internal traffic | `6000` | `:6000` | `xref:configuration/configuration-settings.adoc#config_server.cluster.advertised_address[server.cluster.advertised_address]` is used for the discovery service v2 since Neo4j 5.23. See xref:clustering/setup/discovery.adoc[].
Copy file name to clipboardExpand all lines: modules/ROOT/pages/tutorial/tutorial-clustering-docker.adoc
+136-7Lines changed: 136 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -32,9 +32,58 @@ For more information, see the https://docs.docker.com/compose/install/[Install D
32
32
33
33
*Procedure*
34
34
35
-
. Create a configuration file `neo4j.conf` which will be shared across cluster members and make it readable and writable for the user (eg., `chmod 640 neo4j.conf`)
35
+
. Create a configuration file _neo4j.conf_ which will be shared across cluster members and make it readable and writable for the user (eg., `chmod 640 neo4j.conf`)
# Setting that specifies how much memory Neo4j is allowed to use for the page cache.
44
+
server.memory.pagecache.size=100M
45
+
46
+
# Setting that specifies the initial JVM heap size.
47
+
server.memory.heap.initial_size=100M
48
+
49
+
# The behavior of the discovery service is determined by the parameters `dbms.cluster.discovery.resolver_type`, `dbms.cluster.discovery.v2.endpoints`, and `dbms.cluster.discovery.version`.
50
+
# The DNS strategy fetches the IP addresses of the cluster members using the DNS A records.
51
+
dbms.cluster.discovery.resolver_type=DNS
52
+
53
+
# The value of `dbms.cluster.discovery.version` must be set to `V2_ONLY` if you want to use the discovery service v2.
54
+
# The discovery service v2 utilizes the port `6000`.
55
+
dbms.cluster.discovery.version=V2_ONLY
56
+
57
+
# The value of `dbms.cluster.discovery.v2.endpoints` should be set to a single domain name and the port of the discovery service.
58
+
# The domain name returns an A record for every server in the cluster when a DNS lookup is performed.
59
+
# Each A record returned by DNS should contain the IP address of the server in the cluster.
60
+
# The configured server uses all the IP addresses from the A records to join or form a cluster.
61
+
# The discovery port must be the same on all servers when using this configuration.
# The advertised address for the intra-cluster routing connector.
76
125
server.routing.advertised_address=$(hostname)
77
126
----
78
-
====
127
+
======
128
+
=====
129
+
79
130
. Prepare your _docker-compose.yml_ file using the following example.
80
131
For more information, see the https://docs.docker.com/compose/compose-file/#service-configuration-reference[Docker Compose official Service configuration reference].
81
132
+
@@ -272,10 +323,12 @@ Each container must have a network route to each of the others, the `+NEO4J_init
272
323
The following environment variables are specific to the Neo4j cluster, and are available in the Neo4j Enterprise Edition:
273
324
274
325
* `+NEO4J_initial_server_mode__constraint+`: the database mode, defaults to `NONE`, can be set to `PRIMARY` or `SECONDARY`.
275
-
* `+NEO4J_dbms_cluster_discovery_endpoints+`: a comma-separated list of endpoints, which a server should contact to discover other cluster servers.
276
-
* `+NEO4J_server_discovery_advertised_address+`: hostname/IP address and port to advertise for member discovery management communication.
277
-
* `+NEO4J_server.cluster.advertised_address+`: hostname/IP address and port to advertise for transaction handling.
326
+
* `+NEO4J_dbms_cluster_discovery_endpoints+`: a comma-separated list of endpoints, which a server should contact to discover other cluster servers. label:deprecated[Deprecated in 5.23]
327
+
* `+NEO4J_dbms_cluster_discovery_v2_endpoints+`: a comma-separated list of endpoints, which a server should contact to discover other cluster servers. label:new[Introduced in 5.23]
328
+
* `+NEO4J_server_discovery_advertised_address+`: hostname/IP address and port to advertise for member discovery management communication. label:deprecated[Deprecated in 5.23]
329
+
* `+NEO4J_server.cluster.advertised_address+`: hostname/IP address and port to advertise for transaction handling and v2 discovery.
278
330
* `+NEO4J_server.cluster.raft.advertised_address+`: hostname/IP address and port to advertise for cluster communication.
331
+
* `+NEO4J_dbms_cluster_discovery_version+`: the discovery service version to use, defaults to `V1_ONLY`, can be set to `V1_OVER_V2`, `V2_OVER_V1`, or `V2_ONLY`. label:new[Introduced in 5.23]
279
332
280
333
See xref:clustering/settings.adoc[] for more details of Neo4j cluster settings.
281
334
@@ -285,7 +338,55 @@ See xref:clustering/settings.adoc[] for more details of Neo4j cluster settings.
285
338
Within a single Docker host, you can use the default ports for HTTP, HTTPS, and Bolt.
286
339
For each container, these ports are mapped to a different set of ports on the Docker host.
287
340
288
-
Example of a `docker run` command for deploying a cluster with 3 servers:
341
+
Example of a `docker run` command for deploying a cluster with three servers:
0 commit comments