diff --git a/modules/ROOT/pages/clustering/settings.adoc b/modules/ROOT/pages/clustering/settings.adoc index 658db5000..a7e671b2c 100644 --- a/modules/ROOT/pages/clustering/settings.adoc +++ b/modules/ROOT/pages/clustering/settings.adoc @@ -45,62 +45,28 @@ Possible values are: [.compact] `LIST`:: -Treats `dbms.cluster.discovery.endpoints` (or `dbms.cluster.discovery.v2.endpoints`, if you use discovery service v2 available as of Neo4j 5.23) as a list of addresses of servers to contact for discovery. +Treats `dbms.cluster.endpoints` as a list of addresses of servers to contact for discovery. `DNS`:: -Treats `dbms.cluster.discovery.endpoints` (or `dbms.cluster.discovery.v2.endpoints`, if you use discovery service v2 available as of Neo4j 5.23) as a domain name to resolve via DNS. -Expect DNS resolution to provide A records with hostnames or IP addresses of servers to contact for discovery, on the port specified by `dbms.cluster.discovery.endpoints`. +Treats `dbms.cluster.endpoints` as a domain name to resolve via DNS. +Expect DNS resolution to provide A records with hostnames or IP addresses of servers to contact for discovery, on the port specified by `dbms.cluster.endpoints`. `SRV`:: -Treats `dbms.cluster.discovery.endpoints` (or `dbms.cluster.discovery.v2.endpoints`, if you use discovery service v2 available as of Neo4j 5.23) as a domain name to resolve via DNS. +Treats `dbms.cluster.endpoints` as a domain name to resolve via DNS. Expect DNS resolution to provide SRV records with hostnames or IP addresses and ports, of servers to contact for discovery. `K8S`:: Accesses the Kubernetes list service API to derive addresses of servers to contact for discovery. -Requires `dbms.kubernetes.label_selector` to be a Kubernetes label selector for Kubernetes services running a server each and `dbms.kubernetes.service_port_name` to be a service port name identifying the discovery port of cluster servers services. -The value of `dbms.cluster.discovery.endpoints` (or `dbms.cluster.discovery.v2.endpoints`, if you use discovery service v2 available as of Neo4j 5.23) is ignored for this option. +Requires `dbms.kubernetes.label_selector` to be a Kubernetes label selector for Kubernetes services running a server each and `dbms.kubernetes.discovery.service_port_name` to be a service port name identifying the discovery port of cluster servers services. +The value of `dbms.cluster.endpoints` is ignored for this option. For more details, see xref:clustering/setup/discovery.adoc#clustering-discovery-k8s[Discovery in Kubernetes]. -From Neo4j 5.23, depending on which version of the discovery service you are using, you need to set either `dbms.cluster.discovery.endpoints` or `dbms.cluster.discovery.v2.endpoints` in the _neo4j.conf_ file. +You need to set `dbms.cluster.endpoints` in the _neo4j.conf_ file. Detailed information about discovery and discovery configuration options is given in xref:clustering/setup/discovery.adoc#clustering-discovery-methods[Methods for server discovery]. -| xref:configuration/configuration-settings.adoc#config_dbms.cluster.discovery.endpoints[`dbms.cluster.discovery.endpoints`] label:deprecated[Deprecated in 5.23] -| One or more network addresses used to discover other servers in the cluster. -The exact method by which endpoints are resolved to other cluster members is determined by the value of `dbms.cluster.discovery.resolver_type`. -In the default case, the initial discovery members are given as a comma-separated list of address/port pairs, and the default port for the discovery service is `:5000`. - -It is good practice to set this parameter to the same value on all servers in the cluster. - -**Example:** `dbms.cluster.discovery.resolver_type=LIST` combined with `server01.example.com:5000,server02.example.com:5000,server03.example.com:5000` attempt to reach Neo4j instances listening on _server01.example.com_, _server02.example.com_ and _server03.example.com_; all on port `5000`. - -|xref:configuration/configuration-settings.adoc#config_dbms.cluster.discovery.v2.endpoints[`dbms.cluster.discovery.v2.endpoints`] +|xref:configuration/configuration-settings.adoc#config_dbms.cluster.endpoints[`dbms.cluster.endpoints`] label:renamed[Renamed in 2025.01] |A comma-separated list of endpoints that a server should contact in order to discover other cluster members. Typically, all cluster members, including the current server, must be specified in this list. -The setting configures the endpoints for discovery service v2. **Example:** `dbms.cluster.discovery.resolver_type=LIST` combined with `server01.example.com:6000,server02.example.com:6000,server03.example.com:6000` attempt to reach Neo4j instances listening on _server01.example.com_, _server02.example.com_ and _server03.example.com_; all on port `6000`. -|xref:configuration/configuration-settings.adoc#config_dbms.cluster.discovery.version[`dbms.cluster.discovery.version`] -|This setting allows you to select which discovery service should be started. -Possible values are: - -* V1_ONLY -— it runs only discovery service v1. - -* V1_OVER_V2 -— it runs both discovery service v1 and discovery service v2, where v1 is the main service and v2 runs in the background. - -* V2_OVER_V1 -— it runs both discovery service v1 and discovery service v2, where v2 is the main service and v1 runs in the background. - -* V2_ONLY -- it runs only discovery service v2. - -The default value is `V1_ONLY`. - -Discovery services v1 and v2 are designed to run in parallel. -They are completely independent of each other, thus allowing you to keep the cluster functioning while switching over from v1 to v2. -For details on how to move from discovery service v1 to v2, see xref:clustering/setup/discovery.adoc#clustering-discovery-v1-to-v2[Moving from discovery service v1 to v2]. - -| xref:configuration/configuration-settings.adoc#config_server.discovery.advertised_address[`server.discovery.advertised_address`] label:deprecated[Deprecated in 5.23] -| The address/port setting that specifies where the instance advertises that it listens for discovery protocol messages from other members of the cluster. -If this server is included in the `discovery.endpoints` of other cluster members, the value there must **exactly** match this advertised address. - -**Example:** `server.discovery.advertised_address=192.168.33.21:5001` indicates that other cluster members can communicate with this server using the discovery protocol at host `192.168.33.20` and port `5001`. - | xref:configuration/configuration-settings.adoc#config_server.cluster.raft.advertised_address[`server.cluster.raft.advertised_address`] | The address/port setting that specifies where the Neo4j server advertises to other members of the cluster that it listens for Raft messages within the cluster. @@ -111,11 +77,6 @@ If this server is included in the `discovery.endpoints` of other cluster members **Example:** `causal_clustering.transaction_advertised_address=192.168.33.20:6001` listens for transactions from cluster members on the network interface bound to `192.168.33.20` on port `6001`. -| xref:configuration/configuration-settings.adoc#config_server.discovery.listen_address[`server.discovery.listen_address`] label:deprecated[Deprecated in 5.23] -| The address/port setting that specifies which network interface and port the Neo4j instance binds to for the cluster discovery protocol. - -**Example:** `server.discovery.listen_address=0.0.0.0:5001` listens for cluster membership communication on any network interface at port `5001`. - | xref:configuration/configuration-settings.adoc#config_server.cluster.raft.listen_address[`server.cluster.raft.listen_address`] | The address/port setting that specifies which network interface and port the Neo4j instance binds to for cluster communication. This setting must be set in coordination with the address this instance advertises it listens at in the setting `server.cluster.raft.advertised_address`. diff --git a/modules/ROOT/pages/clustering/setup/analytics-cluster.adoc b/modules/ROOT/pages/clustering/setup/analytics-cluster.adoc index 81d2143d9..d211c756e 100644 --- a/modules/ROOT/pages/clustering/setup/analytics-cluster.adoc +++ b/modules/ROOT/pages/clustering/setup/analytics-cluster.adoc @@ -15,16 +15,9 @@ Bear in mind that the GDS library does **not** support fault tolerance and there === Deploy the cluster -Starting with Neo4j 5.23, you can select between the discovery services: v1 or v2 -- which allows servers to communicate with each other. -Discovery service v2 is recommended for all new deployments, as v1 has been considered deprecated since Neo4j 5.23. -For more details on the Neo4j discovery services, see xref:clustering/setup/discovery.adoc[]. .Configure a cluster with five servers, two only for read queries -[.tabbed-example] -===== -[role=include-with-Discovery-service-v2] -====== In this example, three servers named `server01.example.com`, `server02.example.com` and `server03.example.com` are configured as the transactional part of the cluster. Two more servers names `server04.example.com` and `server05.example.com` are configured for the analytical queries. @@ -37,18 +30,12 @@ Key points: * The servers for analytics have mode constraints configured that restrict their hosting mode to _secondary_ to prevent them from participating in normal write operations. * In the example below, you set `dbms.cluster.discovery.resolver_type=LIST`. -To use the discovery service v2: - -* You have to set the configuration of `dbms.cluster.discovery.version` to `V2_ONLY`. -* Instead of `dbms.cluster.discovery.endpoints`, use `dbms.cluster.discovery.v2.endpoints`. - ._neo4j.conf_ on server01.example.com: [source, properties] ---- server.default_listen_address=0.0.0.0 server.default_advertised_address=server01.example.com -dbms.cluster.discovery.v2.endpoints=server01.example.com:6000,server02.example.com:6000,server03.example.com:6000,server04.example.com:6000,server05.example.com:6000 -dbms.cluster.discovery.version=V2_ONLY +dbms.cluster.endpoints=server01.example.com:6000,server02.example.com:6000,server03.example.com:6000,server04.example.com:6000,server05.example.com:6000 ---- ._neo4j.conf_ on server02.example.com: @@ -56,8 +43,7 @@ dbms.cluster.discovery.version=V2_ONLY ---- server.default_listen_address=0.0.0.0 server.default_advertised_address=server02.example.com -dbms.cluster.discovery.v2.endpoints=server01.example.com:6000,server02.example.com:6000,server03.example.com:6000,server04.example.com:6000,server05.example.com:6000 -dbms.cluster.discovery.version=V2_ONLY +dbms.cluster.endpoints=server01.example.com:6000,server02.example.com:6000,server03.example.com:6000,server04.example.com:6000,server05.example.com:6000 ---- ._neo4j.conf_ on server03.example.com: @@ -65,8 +51,7 @@ dbms.cluster.discovery.version=V2_ONLY ---- server.default_listen_address=0.0.0.0 server.default_advertised_address=server03.example.com -dbms.cluster.discovery.v2.endpoints=server01.example.com:6000,server02.example.com:6000,server03.example.com:6000,server04.example.com:6000,server05.example.com:6000 -dbms.cluster.discovery.version=V2_ONLY +dbms.cluster.endpoints=server01.example.com:6000,server02.example.com:6000,server03.example.com:6000,server04.example.com:6000,server05.example.com:6000 ---- ._neo4j.conf_ on server04.example.com - an analytics server: @@ -74,8 +59,7 @@ dbms.cluster.discovery.version=V2_ONLY ---- server.default_listen_address=0.0.0.0 server.default_advertised_address=server04.example.com -dbms.cluster.discovery.v2.endpoints=server01.example.com:6000,server02.example.com:6000,server03.example.com:6000,server04.example.com:6000,server05.example.com:6000 -dbms.cluster.discovery.version=V2_ONLY +dbms.cluster.endpoints=server01.example.com:6000,server02.example.com:6000,server03.example.com:6000,server04.example.com:6000,server05.example.com:6000 initial.server.mode_constraint=SECONDARY server.cluster.system_database_mode=SECONDARY ---- @@ -85,8 +69,7 @@ server.cluster.system_database_mode=SECONDARY ---- server.default_listen_address=0.0.0.0 server.default_advertised_address=server05.example.com -dbms.cluster.discovery.v2.endpoints=server01.example.com:6000,server02.example.com:6000,server03.example.com:6000,server04.example.com:6000,server05.example.com:6000 -dbms.cluster.discovery.version=V2_ONLY +dbms.cluster.endpoints=server01.example.com:6000,server02.example.com:6000,server03.example.com:6000,server04.example.com:6000,server05.example.com:6000 initial.server.mode_constraint=SECONDARY server.cluster.system_database_mode=SECONDARY ---- @@ -135,112 +118,6 @@ SHOW SERVERS YIELD *; +-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ ---- -====== -[role=include-with-Discovery-service-v1 label--deprecated-5.23] -====== - -In this example, three servers named `server01.example.com`, `server02.example.com` and `server03.example.com` are configured as the transactional part of the cluster. -Two more servers names `server04.example.com` and `server05.example.com` are configured for the analytical queries. -Neo4j Enterprise Edition is installed on all five servers. -They are configured by preparing xref:configuration/file-locations.adoc[_neo4j.conf_] on each server. - -Key points: - -* All servers include _all_ members in their discovery list. -* The servers for analytics have mode constraints configured that restrict their hosting mode to _secondary_ to prevent them from participating in normal write operations. -* In the example below, you set `dbms.cluster.discovery.resolver_type=LIST`. - -._neo4j.conf_ on server01.example.com: -[source, properties] ----- -server.default_listen_address=0.0.0.0 -server.default_advertised_address=server01.example.com -dbms.cluster.discovery.endpoints=server01.example.com:5000,server02.example.com:5000,server03.example.com:5000,server04.example.com:5000,server05.example.com:5000 ----- - -._neo4j.conf_ on server02.example.com: -[source, properties] ----- -server.default_listen_address=0.0.0.0 -server.default_advertised_address=server02.example.com -dbms.cluster.discovery.endpoints=server01.example.com:5000,server02.example.com:5000,server03.example.com:5000,server04.example.com:5000,server05.example.com:5000 ----- - -._neo4j.conf_ on server03.example.com: -[source, properties] ----- -server.default_listen_address=0.0.0.0 -server.default_advertised_address=server03.example.com -dbms.cluster.discovery.endpoints=server01.example.com:5000,server02.example.com:5000,server03.example.com:5000,server04.example.com:5000,server05.example.com:5000 ----- - -._neo4j.conf_ on server04.example.com - an analytics server: -[source, properties] ----- -server.default_listen_address=0.0.0.0 -server.default_advertised_address=server04.example.com -dbms.cluster.discovery.endpoints=server01.example.com:5000,server02.example.com:5000,server03.example.com:5000,server04.example.com:5000,server05.example.com:5000 -initial.server.mode_constraint=SECONDARY -server.cluster.system_database_mode=SECONDARY ----- - -._neo4j.conf_ on server05.example.com - an analytics server: -[source, properties] ----- -server.default_listen_address=0.0.0.0 -server.default_advertised_address=server05.example.com -dbms.cluster.discovery.endpoints=server01.example.com:5000,server02.example.com:5000,server03.example.com:5000,server04.example.com:5000,server05.example.com:5000 -initial.server.mode_constraint=SECONDARY -server.cluster.system_database_mode=SECONDARY ----- - -The Neo4j servers are ready to be started. -The startup order does not matter. - -After the cluster has started, it is possible to connect to any of the instances and run `SHOW SERVERS` to check the status of the cluster. -This shows information about each member of the cluster: - -[source, cypher, role=noplay] ----- -SHOW SERVERS; ----- - -[queryresult] ----- -+-----------------------------------------------------------------------------------------------------------+ -| name | address | state | health | hosting | -+-----------------------------------------------------------------------------------------------------------+ -| "f3bd1199-bc6f-4a38-b25c-5f7588df5182" | "server01:7687" | "Enabled" | "Available" | ["system", "neo4j"] | -| "b331e481-c2ba-4b4e-82f3-bb51fe171483" | "server02:7687" | "Enabled" | "Available" | ["system"] | -| "bd80e8fd-a51b-406a-9ed4-42daf4792aa6" | "server03:7687" | "Enabled" | "Available" | ["system"] | -| "df3758b1-337f-4b8a-a9de-8e745ca96549" | "server04:7687" | "Free" | "Available" | ["system"] | -| "9207bfd9-aa1b-40c2-b965-edcd3955a20e" | "server05:7687" | "Free" | "Available" | ["system"] | -+-----------------------------------------------------------------------------------------------------------+ ----- - -For more extensive information about each server, use the `SHOW SERVERS YIELD *` command: - -[source, cypher, role=noplay] ----- -SHOW SERVERS YIELD *; ----- - -[queryresult] ----- -+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| serverId | name | address | state | health | hosting | requestedHosting | tags | allowedDatabases | deniedDatabases | modeConstraint | version | -+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| "f3bd1199-bc6f-4a38-b25c-5f7588df5182" | "f3bd1199-bc6f-4a38-b25c-5f7588df5182" | "server01:7687" | "Enabled" | "Available" | ["system", "neo4j"] | ["system", "neo4j"] | [] | [] | [] | "NONE" | "5.8.0" | -| "b331e481-c2ba-4b4e-82f3-bb51fe171483" | "b331e481-c2ba-4b4e-82f3-bb51fe171483" | "server02:7687" | "Enabled" | "Available" | ["system"] | ["system"] | [] | [] | [] | "NONE" | "5.8.0" | -| "bd80e8fd-a51b-406a-9ed4-42daf4792aa6" | "bd80e8fd-a51b-406a-9ed4-42daf4792aa6" | "server03:7687" | "Enabled" | "Available" | ["system"] | ["system"] | [] | [] | [] | "NONE" | "5.8.0" | -| "df3758b1-337f-4b8a-a9de-8e745ca96549" | "df3758b1-337f-4b8a-a9de-8e745ca96549" | "server04:7687" | "Free" | "Available" | ["system"] | [] | [] | [] | [] | "SECONDARY" | "5.8.0" | -| "9207bfd9-aa1b-40c2-b965-edcd3955a20e" | "9207bfd9-aa1b-40c2-b965-edcd3955a20e" | "server05:7687" | "Free" | "Available" | ["system"] | [] | [] | [] | [] | "SECONDARY" | "5.8.0" | -+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ ----- -====== -===== - - [[cluster-example-create-databases-on-cluster]] === Create new databases in the cluster @@ -278,104 +155,6 @@ The following example shows how to set up a non-fault tolerant analytics cluster .Configure a cluster with three servers -[.tabbed-example] -===== -[role=include-with-Discovery-service-v2] -====== -In this example, three servers named `server01.example.com`, `server02.example.com` and `server03.example.com` are configured. -Neo4j Enterprise Edition is installed on all three servers. -They are configured by preparing xref:configuration/file-locations.adoc[_neo4j.conf_] on each server. -Note that `server01.example.com` is different from the others, and is the only server where write operations take place. -The other servers are able to execute read queries, and if using GDS, to write results back to the writing server. - -Key points: - -* The writer server only has itself in the list of discovery. -This means it does not seek out the other members when it starts, they have to discover it. -This is required in order to have a cluster with only a single primary for the `system` database. -* The servers for analytics have mode constraints configured that restrict their hosting mode to _secondary_ to prevent them from participating in normal write operations. -* In the example below, you set `dbms.cluster.discovery.resolver_type=LIST`. - -To use the discovery service v2: - -* You have to set the configuration of `dbms.cluster.discovery.version` to `V2_ONLY`. -* Instead of `dbms.cluster.discovery.endpoints`, use `dbms.cluster.discovery.v2.endpoints`. - -._neo4j.conf_ on server01.example.com - the writer: -[source, properties] ----- -server.default_listen_address=0.0.0.0 -server.default_advertised_address=server01.example.com -# Only has self in this list -dbms.cluster.discovery.v2.endpoints=server01.example.com:6000 -dbms.cluster.discovery.version=V2_ONLY ----- - -._neo4j.conf_ on server02.example.com - an analytics server: -[source, properties] ----- -server.default_listen_address=0.0.0.0 -server.default_advertised_address=server02.example.com -dbms.cluster.discovery.v2.endpoints=server01.example.com:6000,server02.example.com:6000,server03.example.com:6000 -dbms.cluster.discovery.version=V2_ONLY -initial.server.mode_constraint=SECONDARY -server.cluster.system_database_mode=SECONDARY ----- - -._neo4j.conf_ on server03.example.com - an analytics server: -[source, properties] ----- -server.default_listen_address=0.0.0.0 -server.default_advertised_address=server03.example.com -dbms.cluster.discovery.v2.endpoints=server01.example.com:6000,server02.example.com:6000,server03.example.com:6000 -dbms.cluster.discovery.version=V2_ONLY -initial.server.mode_constraint=SECONDARY -server.cluster.system_database_mode=SECONDARY ----- - -The Neo4j servers are ready to be started. -The startup order does not matter. - -After the cluster has started, it is possible to connect to any of the instances and run `SHOW SERVERS` to check the status of the cluster. -This shows information about each member of the cluster: - -[source, cypher, role=noplay] ----- -SHOW SERVERS; ----- - -[queryresult] ----- -+-----------------------------------------------------------------------------------------------------------+ -| name | address | state | health | hosting | -+-----------------------------------------------------------------------------------------------------------+ -| "d6fbe54b-0c6a-4959-9bcb-dcbbe80262a4" | "server01:7687" | "Enabled" | "Available" | ["system", "neo4j"] | -| "e56b49ea-243f-11ed-861d-0242ac120002" | "server02:7687" | "Free" | "Available" | ["system"] | -| "73e9a990-0a97-4a09-91e9-622bf0b239a4" | "server03:7687" | "Free" | "Available" | ["system"] | -+-----------------------------------------------------------------------------------------------------------+ ----- - -For more extensive information about each server, use the `SHOW SERVERS YIELD *` command: - -[source, cypher, role=noplay] ----- -SHOW SERVERS YIELD *; ----- - -[queryresult] ----- -+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| serverId | name | address | state | health | hosting | requestedHosting | tags | allowedDatabases | deniedDatabases | modeConstraint | version | -+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| "d6fbe54b-0c6a-4959-9bcb-dcbbe80262a4" | "d6fbe54b-0c6a-4959-9bcb-dcbbe80262a4" | "server01:7687" | "Enabled" | "Available" | ["system", "neo4j"] | ["system", "neo4j"] | [] | [] | [] | "NONE" | "5.8.0" | -| "e56b49ea-243f-11ed-861d-0242ac120002" | "e56b49ea-243f-11ed-861d-0242ac120002" | "server02:7687" | "Free" | "Available" | ["system"] | ["system"] | [] | [] | [] | "SECONDARY" | "5.8.0" | -| "73e9a990-0a97-4a09-91e9-622bf0b239a4" | "73e9a990-0a97-4a09-91e9-622bf0b239a4" | "server03:7687" | "Free" | "Available" | ["system"] | ["system"] | [] | [] | [] | "SECONDARY" | "5.8.0" | -+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ ----- -====== -[role=include-with-Discovery-service-v1 label--deprecated-5.23] -====== - In this example, three servers named `server01.example.com`, `server02.example.com` and `server03.example.com` are configured. Neo4j Enterprise Edition is installed on all three servers. They are configured by preparing xref:configuration/file-locations.adoc[_neo4j.conf_] on each server. @@ -390,14 +169,13 @@ This is required in order to have a cluster with only a single primary for the ` * The servers for analytics have mode constraints configured that restrict their hosting mode to _secondary_ to prevent them from participating in normal write operations. * In the example below, you set `dbms.cluster.discovery.resolver_type=LIST`. - ._neo4j.conf_ on server01.example.com - the writer: [source, properties] ---- server.default_listen_address=0.0.0.0 server.default_advertised_address=server01.example.com # Only has self in this list -dbms.cluster.discovery.endpoints=server01.example.com:5000 +dbms.cluster.endpoints=server01.example.com:6000 ---- ._neo4j.conf_ on server02.example.com - an analytics server: @@ -405,7 +183,7 @@ dbms.cluster.discovery.endpoints=server01.example.com:5000 ---- server.default_listen_address=0.0.0.0 server.default_advertised_address=server02.example.com -dbms.cluster.discovery.endpoints=server01.example.com:5000,server02.example.com:5000,server03.example.com:5000 +dbms.cluster.endpoints=server01.example.com:6000,server02.example.com:6000,server03.example.com:6000 initial.server.mode_constraint=SECONDARY server.cluster.system_database_mode=SECONDARY ---- @@ -415,7 +193,7 @@ server.cluster.system_database_mode=SECONDARY ---- server.default_listen_address=0.0.0.0 server.default_advertised_address=server03.example.com -dbms.cluster.discovery.endpoints=server01.example.com:5000,server02.example.com:5000,server03.example.com:5000 +dbms.cluster.endpoints=server01.example.com:6000,server02.example.com:6000,server03.example.com:6000 initial.server.mode_constraint=SECONDARY server.cluster.system_database_mode=SECONDARY ---- @@ -460,8 +238,6 @@ SHOW SERVERS YIELD *; +-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ ---- -====== -===== [[cluster-example-create-databases-on-single-primary-cluster]] === Create new databases in the cluster diff --git a/modules/ROOT/pages/clustering/setup/deploy.adoc b/modules/ROOT/pages/clustering/setup/deploy.adoc index 110c9aa16..7a38695b0 100644 --- a/modules/ROOT/pages/clustering/setup/deploy.adoc +++ b/modules/ROOT/pages/clustering/setup/deploy.adoc @@ -9,11 +9,6 @@ The following configuration settings are important to consider when deploying a //Remember to update the settings and link below. See also xref:clustering/settings.adoc[Settings reference] for more detailed descriptions and examples. -Starting with Neo4j 5.23, you get the option to choose between two discovery services: v1 or v2. -They are designed to run independently and in parallel. -However, the new version, v2, is recommended for new deployments, as v1 has been considered deprecated since Neo4j 5.23. -For more details, see xref:clustering/setup/discovery.adoc[]. - .Important settings for clusters [options="header",cols="<3,<4"] |=== @@ -25,14 +20,8 @@ In the typical case, this should be set to the fully qualified domain name or th | xref:configuration/configuration-settings.adoc#config_server.default_listen_address[`server.default_listen_address`] | The address or network interface this machine uses to listen for incoming messages. Setting this value to `0.0.0.0` makes Neo4j bind to all available network interfaces. -| xref:configuration/configuration-settings.adoc#config_dbms.cluster.discovery.v2.endpoints[`dbms.cluster.discovery.v2.endpoints`] +| xref:configuration/configuration-settings.adoc#config_dbms.cluster.endpoints[`dbms.cluster.endpoints`] | A comma-separated list of endpoints that a server should contact in order to discover other cluster members. Typically, all cluster members, including the current server, must be specified in this list. -The setting configures the endpoints for **discovery service v2**. -| xref:configuration/configuration-settings.adoc#config_dbms.cluster.discovery.version[`dbms.cluster.discovery.version`] -| This setting allows you to select which discovery service should be started. -| xref:configuration/configuration-settings.adoc#config_dbms.cluster.discovery.endpoints[`dbms.cluster.discovery.endpoints`] label:deprecated[Deprecated in 5.23] -| The discovery network address for all the members of the cluster, including this server. -The setting must be set to the same value on all cluster members. The behavior of this setting can be modified by configuring the setting `dbms.cluster.discovery.resolver_type`. This is described in detail in xref:clustering/setup/discovery.adoc[]. | xref:configuration/configuration-settings.adoc#config_initial.dbms.default_primaries_count[`initial.dbms.default_primaries_count`] @@ -71,32 +60,19 @@ In this case, you set `dbms.cluster.discovery.resolver_type=LIST`. .Configure a cluster with three servers in primary mode -[.tabbed-example] -===== -[role=include-with-Discovery-service-v2] -====== - - In this example, three servers named `server01.example.com`, `server02.example.com` and `server03.example.com` are configured. Neo4j Enterprise Edition is installed on all three servers. They are configured by preparing xref:configuration/file-locations.adoc[_neo4j.conf_] on each server. Note that they are all identical, except for the configuration of `server.default_advertised_address`. -To use discovery service v2: - -* You have to set the configuration of `dbms.cluster.discovery.version` to `V2_ONLY`. - -* Instead of `dbms.cluster.discovery.endpoints`, use `dbms.cluster.discovery.v2.endpoints`. - ._neo4j.conf_ on server01.example.com: [source, properties] ---- server.default_listen_address=0.0.0.0 server.default_advertised_address=server01.example.com -dbms.cluster.discovery.v2.endpoints=server01.example.com:6000,server02.example.com:6000,server03.example.com:6000 -dbms.cluster.discovery.version=V2_ONLY +dbms.cluster.endpoints=server01.example.com:6000,server02.example.com:6000,server03.example.com:6000 initial.dbms.default_primaries_count=3 ---- @@ -105,8 +81,7 @@ initial.dbms.default_primaries_count=3 ---- server.default_listen_address=0.0.0.0 server.default_advertised_address=server02.example.com -dbms.cluster.discovery.v2.endpoints=server01.example.com:6000,server02.example.com:6000,server03.example.com:6000 -dbms.cluster.discovery.version=V2_ONLY +dbms.cluster.endpoints=server01.example.com:6000,server02.example.com:6000,server03.example.com:6000 initial.dbms.default_primaries_count=3 ---- @@ -115,8 +90,7 @@ initial.dbms.default_primaries_count=3 ---- server.default_listen_address=0.0.0.0 server.default_advertised_address=server03.example.com -dbms.cluster.discovery.v2.endpoints=server01.example.com:6000,server02.example.com:6000,server03.example.com:6000 -dbms.cluster.discovery.version=V2_ONLY +dbms.cluster.endpoints=server01.example.com:6000,server02.example.com:6000,server03.example.com:6000 initial.dbms.default_primaries_count=3 ---- @@ -167,92 +141,6 @@ The instance may appear unavailable while it is joining the cluster. If you want to follow along with the startup, you can see the messages in xref:configuration/file-locations.adoc[_neo4j.log_]. ==== -====== -[role=include-with-Discovery-service-v1 label--deprecated-5.23] -====== - -In this example, three servers named `server01.example.com`, `server02.example.com` and `server03.example.com` are configured. -Neo4j Enterprise Edition is installed on all three servers. -They are configured by preparing xref:configuration/file-locations.adoc[_neo4j.conf_] on each server. -Note that they are all identical, except for the configuration of `server.default_advertised_address`: - -._neo4j.conf_ on server01.example.com: -[source, properties] ----- -server.default_listen_address=0.0.0.0 -server.default_advertised_address=server01.example.com -dbms.cluster.discovery.endpoints=server01.example.com:5000,server02.example.com:5000,server03.example.com:5000 -initial.dbms.default_primaries_count=3 ----- - -._neo4j.conf_ on server02.example.com: -[source, properties] ----- -server.default_listen_address=0.0.0.0 -server.default_advertised_address=server02.example.com -dbms.cluster.discovery.endpoints=server01.example.com:5000,server02.example.com:5000,server03.example.com:5000 -initial.dbms.default_primaries_count=3 ----- - -._neo4j.conf_ on server03.example.com: -[source, properties] ----- -server.default_listen_address=0.0.0.0 -server.default_advertised_address=server03.example.com -dbms.cluster.discovery.endpoints=server01.example.com:5000,server02.example.com:5000,server03.example.com:5000 -initial.dbms.default_primaries_count=3 ----- - -The Neo4j servers are ready to be started. -The startup order does not matter. - -After the cluster has started, it is possible to connect to any of the instances and run `SHOW SERVERS` to check the status of the cluster. -This shows information about each member of the cluster: - -[source, cypher, role=noplay] ----- -SHOW SERVERS; ----- - -[queryresult] ----- -+-----------------------------------------------------------------------------------------------------------+ -| name | address | state | health | hosting | -+-----------------------------------------------------------------------------------------------------------+ -| "d6fbe54b-0c6a-4959-9bcb-dcbbe80262a4" | "server01:7687" | "Enabled" | "Available" | ["system", "neo4j"] | -| "e56b49ea-243f-11ed-861d-0242ac120002" | "server02:7687" | "Enabled" | "Available" | ["system", "neo4j"] | -| "73e9a990-0a97-4a09-91e9-622bf0b239a4" | "server03:7687" | "Enabled" | "Available" | ["system", "neo4j"] | -+-----------------------------------------------------------------------------------------------------------+ ----- - -For more extensive information about each server, use the `SHOW SERVERS YIELD *` command: - -[source, cypher, role=noplay] ----- -SHOW SERVERS YIELD *; ----- - -[queryresult] ----- -+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| serverId | name | address | state | health | hosting | requestedHosting | tags | allowedDatabases | deniedDatabases | modeConstraint | version | -+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| "d6fbe54b-0c6a-4959-9bcb-dcbbe80262a4" | "d6fbe54b-0c6a-4959-9bcb-dcbbe80262a4" | "server01:7687" | "Enabled" | "Available" | ["system", "neo4j"] | ["system", "neo4j"] | [] | [] | [] | "NONE" | "5.0.0" | -| "e56b49ea-243f-11ed-861d-0242ac120002" | "e56b49ea-243f-11ed-861d-0242ac120002" | "server02:7687" | "Enabled" | "Available" | ["system", "neo4j"] | ["system", "neo4j"] | [] | [] | [] | "NONE" | "5.0.0" | -| "73e9a990-0a97-4a09-91e9-622bf0b239a4" | "73e9a990-0a97-4a09-91e9-622bf0b239a4" | "server03:7687" | "Enabled" | "Available" | ["system", "neo4j"] | ["system", "neo4j"] | [] | [] | [] | "NONE" | "5.0.0" | -+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ ----- - -[TIP] -.Startup time -==== -The instance may appear unavailable while it is joining the cluster. -If you want to follow along with the startup, you can see the messages in xref:configuration/file-locations.adoc[_neo4j.log_]. -==== - -====== -===== - [CAUTION] ==== The setting diff --git a/modules/ROOT/pages/clustering/setup/discovery.adoc b/modules/ROOT/pages/clustering/setup/discovery.adoc index 56e2d7d5d..b18ac6224 100644 --- a/modules/ROOT/pages/clustering/setup/discovery.adoc +++ b/modules/ROOT/pages/clustering/setup/discovery.adoc @@ -11,23 +11,12 @@ Neo4j provides several mechanisms for cluster members to discover each other and [IMPORTANT] ==== -In Neo4j 5.23, the discovery service v2 has been introduced. -The new version, v2, is recommended for new deployments. +In Neo4j 5.23, a new discovery service was introduced. +You must move to the new version before you start using Neo4j 2025.01. -The current version, v1, has been deprecated and will be removed in a future release. -Therefore, it is highly recommended to move from v1 to v2. -For details, see <>. +See link:https://neo4j.com/docs/operations-manual/5/clustering/setup/discovery/[the guide for the Neo4j 5.x series] for more information. ==== -The new version v2 introduces the following configuration settings to control the discovery service: - -* xref:configuration/configuration-settings.adoc#config_dbms.cluster.discovery.v2.endpoints[`dbms.cluster.discovery.v2.endpoints`] to specify the list of server addresses for discovery when using version v2. -* xref:configuration/configuration-settings.adoc#config_dbms.cluster.discovery.version[`dbms.cluster.discovery.version`] to specify the version of the discovery service. -Possible values are `V1_ONLY`, `V2_ONLY`, `V1_OVER_V2`, and `V2_OVER_V1`. -* xref:configuration/configuration-settings.adoc#config_dbms.kubernetes.discovery.v2.service_port_name[`dbms.kubernetes.discovery.v2.service_port_name`] to specify the name of the service port name used in the Kubernetes API when using version v2. - -The following sections describe the different methods for server discovery, configuration settings, and examples of how to move from discovery service v1 to v2. - [[clustering-discovery-methods]] == Methods for server discovery @@ -48,35 +37,15 @@ This can be the case, for example, when using container orchestration to deploy To use this method, set `dbms.cluster.discovery.resolver_type=LIST` and hard code the addresses in the configuration of each server. For example: -[.tabbed-example] -===== -[role=include-with-discovery-service-v2] -====== [source, parameters] ---- dbms.cluster.discovery.resolver_type=LIST server.cluster.advertised_address=server01.example.com:6000 -dbms.cluster.discovery.v2.endpoints=server01.example.com:6000,server02.example.com:6000,server03.example.com:6000 - -dbms.cluster.discovery.version=V2_ONLY ----- -====== -[role=include-with-discovery-service-v1 label--deprecated-5.23] -====== -[source, parameters] ----- -dbms.cluster.discovery.resolver_type=LIST - -server.discovery.advertised_address=server01.example.com:5000 -dbms.cluster.discovery.endpoints=server01.example.com:5000,server02.example.com:5000,server03.example.com:5000 - -dbms.cluster.discovery.version=V1_ONLY +dbms.cluster.endpoints=server01.example.com:6000,server02.example.com:6000,server03.example.com:6000 ---- -====== -===== -An example of using this method with discovery service v1 is illustrated by xref:clustering/setup/deploy.adoc#cluster-example-configure-a-three-primary-cluster[Configure a cluster with three servers]. +An example of using this method is illustrated by xref:clustering/setup/deploy.adoc#cluster-example-configure-a-three-primary-cluster[Configure a cluster with three servers]. [[clustering-discovery-dns]] === Discovery using DNS with multiple records @@ -90,37 +59,15 @@ The following DNS-based mechanisms can be used to get the addresses of other ser `dbms.cluster.discovery.resolver_type=DNS`:: With this configuration, the initial discovery members are resolved from _DNS A_ records to find the IP addresses to contact. -In version 1, the value of `dbms.cluster.discovery.endpoints` should be set to a single domain name and the port of the discovery service, while in version 2, the value of `dbms.cluster.discovery.v2.endpoints` should be set to a single domain name and the cluster advertised port. For example: + -[.tabbed-example] -===== -[role=include-with-discovery-service-v2] -====== [source, parameters] ---- dbms.cluster.discovery.resolver_type=DNS server.cluster.advertised_address=server01.example.com:6000 -dbms.cluster.discovery.v2.endpoints=cluster01.example.com:6000 - -dbms.cluster.discovery.version=V2_ONLY - +dbms.cluster.endpoints=cluster01.example.com:6000 ---- -====== -[role=include-with-discovery-service-v1 label--deprecated-5.23] -====== -[source, parameters] ----- -dbms.cluster.discovery.resolver_type=DNS - -server.discovery.advertised_address=server01.example.com:5000 -dbms.cluster.discovery.endpoints=cluster01.example.com:5000 - -dbms.cluster.discovery.version=V1_ONLY ----- -====== -===== + When a DNS lookup is performed, the domain name returns an A record for every server in the cluster, where each A record contains the IP address of the server. The configured server uses all the IP addresses from the A records to join or form a cluster. @@ -134,42 +81,20 @@ If this is not possible, consider using the discovery type `SRV`. `dbms.cluster.discovery.resolver_type=SRV`:: With this configuration, the initial discovery members are resolved from _DNS SRV_ records to find the IP addresses/hostnames and discovery service ports (v1) *or* cluster advertised ports (v2) to contact. + -The value of `dbms.cluster.discovery.endpoints` must be set to a single domain name and the port set to `0`. +The value of `dbms.cluster.endpoints` must be set to a single domain name and the port set to `0`. The domain name returns a single SRV record when a DNS lookup is performed. For example: + -[.tabbed-example] -===== -[role=include-with-discovery-service-v2] -====== [source, parameters] ---- dbms.cluster.discovery.resolver_type=SRV server.cluster.advertised_address=server01.example.com:6000 -dbms.cluster.discovery.v2.endpoints=cluster01.example.com:0 - -dbms.cluster.discovery.version=V2_ONLY +dbms.cluster.endpoints=cluster01.example.com:0 ---- The SRV record returned by DNS should contain the IP address or hostname, and the **cluster** port for the servers to be discovered. The configured server uses all the addresses from the SRV record to join or form a cluster. -====== -[role=include-with-discovery-service-v1 label--deprecated-5.23] -====== -[source, parameters] ----- -dbms.cluster.discovery.resolver_type=SRV - -server.discovery.advertised_address=server01.example.com:5000 -dbms.cluster.discovery.endpoints=cluster01.example.com:0 - -dbms.cluster.discovery.version=V1_ONLY ----- -The SRV record returned by DNS should contain the IP address or hostname, and the *discovery* port for the servers to be discovered. -The configured server uses all the addresses from the SRV record to join or form a cluster. -====== -===== [[clustering-discovery-k8s]] === Discovery in Kubernetes @@ -181,10 +106,10 @@ The following settings are used to configure for this scenario: * Set `dbms.cluster.discovery.resolver_type=K8S`. * Set `xref:configuration/configuration-settings.adoc#config_dbms.kubernetes.label_selector[dbms.kubernetes.label_selector]` to the label selector for the cluster services. For more information, see the https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#label-selectors[Kubernetes official documentation^]. -* Depending on your discovery service version, set either `xref:configuration/configuration-settings.adoc#config_dbms.kubernetes.service_port_name[dbms.kubernetes.service_port_name]` (v1), or xref:configuration/configuration-settings.adoc#config_dbms.kubernetes.discovery.v2.service_port_name[`dbms.kubernetes.discovery.v2.service_port_name]` (v2) to the name of the service port used in the Kubernetes service definition for the Core's discovery port. +* Set xref:configuration/configuration-settings.adoc#config_dbms.kubernetes.discovery.service_port_name[`dbms.kubernetes.discovery.service_port_name]` to the name of the service port used in the Kubernetes service definition for the Core's discovery port. For more information, see the https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.18/#serviceport-v1-core[Kubernetes official documentation^]. -With this configuration, `dbms.cluster.discovery.endpoints` is not used and any value assigned to it is ignored. +With this configuration, `dbms.cluster.endpoints` is not used and any value assigned to it is ignored. [NOTE] ==== @@ -195,524 +120,7 @@ For further information, see the Kubernetes documentation on https://kubernetes. The discovery configuration is used for initial discovery and to continuously exchange information about changes to the topology of the cluster. -[[clustering-discovery-v1-to-v2]] -== Moving from discovery service v1 to v2 - -From Neo4j 5.23, you can move from the current discovery service v1 to the new version v2. -The v1 and v2 discovery services are designed to be able to run in parallel. -They are completely independent of each other, thus allowing you to keep the cluster functioning while switching over from v1 to v2. - -There are four ways to move from the current discovery service v1 to the new version v2 depending on the environment and the requirements of the cluster. - -=== Preparation - -The following examples assume that you have a running cluster with three servers and you want to move from the current discovery service v1 to the new version v2. - -image:discovery-service/v1-only.png[] - -Before moving from the current discovery service v1 to the new version v2, ensure that the new settings are added to the configuration depending on the type of xref:configuration/configuration-settings.adoc#config_dbms.cluster.discovery.resolver_type[`dbms.cluster.discovery.resolver_type`] in use: - -* If `dbms.cluster.discovery.resolver_type=LIST`, set `dbms.cluster.discovery.v2.endpoints` to a comma-separated list of xref:configuration/configuration-settings.adoc#config_server.cluster.advertised_address[`server.cluster.advertised_address`]. -It is important that both `dbms.cluster.discovery.endpoints` and `dbms.cluster.discovery.v2.endpoints` are set during the operation. -For more information, see <>. - -* If `dbms.cluster.discovery.resolver_type=DNS`, set `dbms.cluster.discovery.v2.endpoints` to a single domain name and the cluster port. -Alternatively, if `dbms.cluster.discovery.resolver_type=SRV`, set `dbms.cluster.discovery.v2.endpoints` to a single domain name and the port set to `0`. -It is important that both `dbms.cluster.discovery.endpoints` and `dbms.cluster.discovery.v2.endpoints` are set during the operation. -For more information, see <>. - -* If `dbms.cluster.discovery.resolver_type=K8S`, set `dbms.kubernetes.discovery.v2.service_port_name` to the name of the service port used in the Kubernetes service definition for the cluster port. -It is important that both `dbms.kubernetes.service_port_name` and `dbms.kubernetes.discovery.v2.service_port_name` are set during the operation. -For more information, see <>. - -[[discovery-v1-to-v2-semi-automated-procedure]] -=== Procedure for moving an entire cluster - -The first way to migrate from discovery service v1 to v2 is to use a semi-automated procedure, which simplifies the migration process. -It automates the approach described in the xref:clustering/setup/discovery.adoc#discovery-v1-to-v2-procedures[next section]. - -. Make sure that server side routing is enabled as detailed in xref:clustering/setup/routing.adoc#clustering-routing[Server-side routing] section -. For all the servers, ensure that new settings are updated to the configuration as detailed the xref:clustering/setup/discovery.adoc#_preparation[Preparation] section. -+ -As an example, for those using the list resolver, the settings for all the servers should include: -+ -[source, parameters] ----- -dbms.cluster.discovery.resolver_type=LIST - -dbms.cluster.discovery.endpoints=server01.example.com:5000,server02.example.com:5000,server03.example.com:5000 -dbms.cluster.discovery.v2.endpoints=server01.example.com:6000,server02.example.com:6000,server03.example.com:6000 ----- -+ -. In Cypher Shell, connect to the `system` database of any server: -+ -[source, shell, role=nocopy noplay] ----- -./cypher-shell -a bolt://localhost:7687 -d system ----- -. Run the procedure: -+ -[source,cypher] ----- -CALL dbms.cluster.showParallelDiscoveryState(); ----- -+ -The output indicates mode `V1_ONLY`, i.e., only `V1` is running on this server. -+ -.Expected result -[queryresult] ----- -+-------------------------------------------------------------+ -| mode | stateComparison | v1ServerCount | v2ServerCount | -+-------------------------------------------------------------+ -| "V1_ONLY" | "N/A" | "3" | "N/A" | -+-------------------------------------------------------------+ ----- -. Run the following procedure to turn on `V2` in the background for all servers, but keep `V1` running in the foreground. -If the procedure fails, read the error message and resolve the issue manually. -One possible reason for failure is that some servers might have had inconsistent xref:configuration/configuration-settings.adoc#config_dbms.cluster.discovery.version[`dbms.cluster.discovery.version`] settings initially. -+ -[source,cypher] ----- -CALL dbms.cluster.moveToNextDiscoveryVersion(); ----- -. Check the state again: -+ -[source,cypher] ----- -CALL dbms.cluster.showParallelDiscoveryState(); ----- -+ -Now the returned mode for this server must be `V1_OVER_V2` and the `stateComparison` must show that the states are matching. -If they are not, wait and try again till matching. -+ -.Expected result -[queryresult] ----- -+----------------------------------------------------------------+ -| mode | stateComparison | v1ServerCount | v2ServerCount | -+----------------------------------------------------------------+ -| "V1_OVER_V2" | "Matching" | "3" | "3" | -+----------------------------------------------------------------+ ----- -. Once again, run the following procedure to turn on `V1` in the background for all servers, but keep `V2` running in the foreground. -+ -[source,cypher] ----- -CALL dbms.cluster.moveToNextDiscoveryVersion(); ----- -. Check that transition to `V2_OVER_V1` was successful: -+ -[source,cypher] ----- -CALL dbms.cluster.showParallelDiscoveryState(); ----- -+ -Now the returned mode for this server must be `V2_OVER_V1` and the `stateComparison` must show that the states are matching. -If they are not, wait and try again till matching. -+ -.Expected result -[queryresult] ----- -+----------------------------------------------------------------+ -| mode | stateComparison | v1ServerCount | v2ServerCount | -+----------------------------------------------------------------+ -| "V2_OVER_V1" | "Matching" | "3" | "3" | -+----------------------------------------------------------------+ ----- -. Finally, turn off `V1` by running the following procedure: -+ -[source,cypher] ----- -CALL dbms.cluster.moveToNextDiscoveryVersion(); ----- -. Check that transition to `V2_ONLY` was successful: -+ -[source,cypher] ----- -CALL dbms.cluster.showParallelDiscoveryState(); ----- -+ -Note that `stateComparison` is `N/A` because you do not have `V1` to compare states anymore. -+ -.Expected result -[queryresult] ----- -+-------------------------------------------------------------+ -| mode | stateComparison | v1ServerCount | v2ServerCount | -+-------------------------------------------------------------+ -| "V2_ONLY" | "N/A" | "N/A" | "3" | -+-------------------------------------------------------------+ ----- -+ -.Important -[IMPORTANT] -==== -Remember to update the _neo4j.conf_ files for all the servers. -The switching using procedures does not persist anything to disk. -Therefore, when a server restarts, it starts right back with only v1 running. -As such, ensure that `dbms.cluster.discovery.version=V2_ONLY`, and that `dbms.cluster.discovery.v2.endpoints` or `dbms.kubernetes.discovery.v2.service_port_name` -are set as required, so that the servers start with v2 running on the next restart. -==== - -[[discovery-v1-to-v2-procedures]] -=== Per server procedure - -// By using just procedures, the nice thing is that during the user's normal version upgrade, they can also add the new settings required for v2 discovery service. -// Then, when they are ready to migrate to v2, they can use the procedures and then finally, set the version to 'V2' in the neo4j.conf at the very end - which can just sit there till the next restart -// so no lighthouse-specific server restarts are required if all is done correctly. -//Note that the settings detailed above must first be set and the servers restarted to allow the settings to take effect. - -[IMPORTANT] -==== -If the semi-automated procedure fails, or you need to change individual servers to resolve an issue, this approach will let you do so. -==== - -. For all the servers, ensure that new settings are updated to the configuration as detailed the xref:clustering/setup/discovery.adoc#_preparation[Preparation] section. -+ -As an example, for those using the list resolver, the settings for all the servers should include: -+ -[source, parameters] ----- -dbms.cluster.discovery.resolver_type=LIST - -dbms.cluster.discovery.endpoints=server01.example.com:5000,server02.example.com:5000,server03.example.com:5000 -dbms.cluster.discovery.v2.endpoints=server01.example.com:6000,server02.example.com:6000,server03.example.com:6000 ----- -+ -. In Cypher Shell, connect to the `system` database of server01 using `bolt://`. -It is important to connect via `bolt://` because otherwise the procedure might be routed and executed not on the intended server. -+ -[source, shell, role=nocopy noplay] ----- -./cypher-shell -a bolt://localhost:7687 -d system ----- - -. Run the procedure: -+ -[source,cypher] ----- -CALL dbms.cluster.showParallelDiscoveryState(); ----- -+ -The output indicates mode `V1_ONLY`, i.e., only v1 is running on this server. -+ -.Expected result -[queryresult] ----- -+-------------------------------------------------------------+ -| mode | stateComparison | v1ServerCount | v2ServerCount | -+-------------------------------------------------------------+ -| "V1_ONLY" | "N/A" | "3" | "N/A" | -+-------------------------------------------------------------+ ----- - -. Run the following procedure to turn on v2 in the background, but keep v1 running in the foreground: -+ -[source,cypher] ----- -CALL dbms.cluster.switchDiscoveryServiceVersion("V1_OVER_V2"); ----- - -. Check the state again: -+ -[source,cypher] ----- -CALL dbms.cluster.showParallelDiscoveryState(); ----- -+ -Now the returned mode for this server must be `V1_OVER_V2` and the `stateComparison` must show that the states are not matching yet. -+ -.Expected result -[queryresult] ----- -+-------------------------------------------------------------------------------------------------------+ -| mode | stateComparison | v1ServerCount | v2ServerCount | -+-------------------------------------------------------------------------------------------------------+ -| "V1_OVER_V2" | "States are not matching after PT1M9.518S: (score:18)" | "3" | "1" | -+-------------------------------------------------------------------------------------------------------+ ----- -+ -The score is a measure of how different the states are. -`serverCounts` displays how many servers can be found by v1 and v2 of the discovery service, respectively. -The score is 0 when the states are matching. -When some members are running just one of the discovery services (v1 or v2) and other members run both, the score stays permanently high. -This is no reason for worry. - - -. To fulfill this convergence, in different terminals, connect to server02 and server03 via `bolt://` and repeat steps 3 and 4 on both of them. - -. Check the state on all servers again. -It should show that the states are `Matching`. -Both `serverCounts` should be 3. -+ -.Expected result -[queryresult] ----- -+----------------------------------------------------------------+ -| mode | stateComparison | v1ServerCount | v2ServerCount | -+----------------------------------------------------------------+ -| "V1_OVER_V2" | "Matching" | "3" | "3" | -+----------------------------------------------------------------+ ----- - -. On all three servers, run: -+ -[source,cypher] ----- -CALL dbms.cluster.switchDiscoveryServiceVersion("V2_OVER_V1"); ----- -+ -At this point, v2 is the service that is running the cluster, with v1 running in the background. -+ -.Expected result -[queryresult] ----- -+----------------------------------------------------------------+ -| mode | stateComparison | v1ServerCount | v2ServerCount | -+----------------------------------------------------------------+ -| "V2_OVER_V1" | "Matching" | "3" | "3" | -+----------------------------------------------------------------+ ----- - - -. Finally, turn off v1 by running the following procedure on all three servers: -+ -[source,cypher] ----- -CALL dbms.cluster.switchDiscoveryServiceVersion("V2_ONLY"); ----- - -. Verify that `CALL dbms.cluster.showParallelDiscoveryState();` now shows `V2_ONLY` running. -Note that `stateComparison` is `N/A` because you do not have v1 to compare states anymore. -+ -.Expected result -[queryresult] ----- -+-------------------------------------------------------------+ -| mode | stateComparison | v1ServerCount | v2ServerCount | -+-------------------------------------------------------------+ -| "V2_ONLY" | "N/A" | "N/A" | "3" | -+-------------------------------------------------------------+ ----- -+ -.Important -[IMPORTANT] -==== -Remember to update the _neo4j.conf_ files for all the servers. -The switching using procedures does not persist anything to disk. -Therefore, when a server restarts, it starts right back with only v1 running. -As such, ensure that `dbms.cluster.discovery.version=V2_ONLY`, and that `dbms.cluster.discovery.v2.endpoints` or `dbms.kubernetes.discovery.v2.service_port_name` -are set as required, so that the servers start with v2 running on the next restart. -==== - -[[discovery-v1-to-v2-in-place]] -=== In-place rolling - -[IMPORTANT] -==== -In-place rolling reduces fault tolerance temporarily because you are restarting a running server. -To keep fault-tolerance, you can introduce a fourth server temporarily. -==== -. For all the servers, ensure that new settings are added to the configuration as detailed the xref:clustering/setup/discovery.adoc#_preparation[Preparation] section. -+ -As an example, for those using the list resolver, the settings for all the servers should include: -+ -[source, parameters] ----- -dbms.cluster.discovery.resolver_type=LIST - -dbms.cluster.discovery.endpoints=server01.example.com:5000,server02.example.com:5000,server03.example.com:5000 -dbms.cluster.discovery.v2.endpoints=server01.example.com:6000,server02.example.com:6000,server03.example.com:6000 ----- -. Restart server01 with the new setting `dbms.cluster.discovery.version=V1_OVER_V2`. -+ -image:discovery-service/in-place-1-v1-over-v2.png[] -. Run `SHOW SERVERS` and ensure that all three members are alive. -. Then repeat steps 2 and 3 for server02 and server03. -Ensure that they are set to `dbms.cluster.discovery.version=V1_OVER_V2`. -Restart them sequentially, not in parallel. -+ -image:discovery-service/in-place-23-v1-over-v2.png[] - -. Using `bolt://`, connect to the system database of servers 1, 2, 3, and run the following procedure. -This can be done using via `./cypher-shell -a bolt://localhost:7687 -d system` for example. -+ -[source,cypher] ----- -CALL dbms.cluster.showParallelDiscoveryState(); ----- -+ -They should display "Matching" in the `stateComparison` column. -+ -.Expected result -[queryresult] ----- -+----------------------------------------------------------------+ -| mode | stateComparison | v1ServerCount | v2ServerCount | -+----------------------------------------------------------------+ -| "V1_OVER_V2" | "Matching" | "3" | "3" | -+----------------------------------------------------------------+ ----- -+ -If they are not, wait and try again. -+ -. Restart server01 again with the new setting `dbms.cluster.discovery.version=V2_OVER_V1`. -+ -image:discovery-service/in-place-1-v2-over-v1.png[] -+ -. Run `SHOW SERVERS` and ensure that all three members are alive. -. Then repeat steps 6 and 7 for servers 2 and 3. -Ensure that they are set to `dbms.cluster.discovery.version=V2_OVER_V1`. -Restart them sequentially, not in parallel. -+ -image:discovery-service/in-place-23-v2-over-v1.png[] - -. Similar to step 5, verify that `stateComparison` shows `Matching`. - -. Repeat steps 6, 7, 8, 9, restarting servers 1, 2, and 3 sequentially, with the new setting `dbms.cluster.discovery.version=V2_ONLY` -image:discovery-service/in-place-123-v2-only.png[] -. Verify that `CALL dbms.cluster.showParallelDiscoveryState()` now shows `V2_ONLY` running. -Note that `stateComparison` is `N/A` because you do not have v1 to compare states anymore. - -[[discovery-v1-to-v2-new-server]] -=== New server rolling -The new server rolling requires three running servers and three new servers. - -. Start up the three new servers with the setting `dbms.cluster.discovery.version=V1_OVER_V2`. -+ -image:discovery-service/v1_over_v2.png[] -+ -The new servers should have settings which are updated as detailed in the xref:clustering/setup/discovery.adoc#_preparation[Preparation] section. -The discovery addresses should include addresses of the new members, and the previous members. -+ -As an example, for those using the list resolver, the settings for the new servers should include: -+ -[source, parameters] ----- -dbms.cluster.discovery.resolver_type=LIST -dbms.cluster.discovery.version=V1_OVER_V2 - -dbms.cluster.discovery.endpoints=server01.example.com:5000,server02.example.com:5000,server03.example.com:5000,server04.example.com:5000,server05.example.com:5000,server06.example.com:5000 -dbms.cluster.discovery.v2.endpoints=server01.example.com:6000,server02.example.com:6000,server03.example.com:6000,server04.example.com:6000,server05.example.com:6000,server06.example.com:6000 ----- -+ -. Using `bolt://`, connect to the system database of servers 4, 5, 6, and run the following procedure. -This can be done using via `./cypher-shell -a bolt://localhost:7685 -d system` for example. -+ -[source,cypher] ----- -CALL dbms.cluster.showParallelDiscoveryState(); ----- -+ -The expected result should display `v2ServerCount` as 3. -`stateComparison` is not expected to match at this stage because the original servers are not visible to the V2 discovery service. -+ -.Expected result -[queryresult] ----- - +---------------------------------------------------------------------------------------------------------+ - | mode | stateComparison | v1ServerCount | v2ServerCount | - +---------------------------------------------------------------------------------------------------------+ - | "V1_OVER_V2" | "States are not matching after PT55M36.693S: (score:29)" | "6" | "3" | - +---------------------------------------------------------------------------------------------------------+ ----- -+ -. Deallocate, drop, and shut down servers 1, 2, 3. -+ -. Start up servers 7, 8, 9, this time with the setting `dbms.cluster.discovery.version=V2_OVER_V1`. -+ -image:discovery-service/v2_over_v1.png[] -+ -The discovery addresses in the settings should include addresses of the new members, and the previous members. -+ -As an example, for those using the list resolver, the settings for the new servers should include: -+ -[source, parameters] ----- -dbms.cluster.discovery.resolver_type=LIST -dbms.cluster.discovery.version=V2_OVER_V1 - -dbms.cluster.discovery.endpoints=server04.example.com:5000,server05.example.com:5000,server06.example.com:5000,server07.example.com:5000,server08.example.com:5000,server09.example.com:5000 -dbms.cluster.discovery.v2.endpoints=server04.example.com:6000,server05.example.com:6000,server06.example.com:6000,server07.example.com:6000,server08.example.com:6000,server09.example.com:6000 ----- -+ -. Using `bolt://`, connect to the system database of servers 7, 8, 9 and run the following procedure: -+ -[source,cypher] ----- -CALL dbms.cluster.showParallelDiscoveryState(); ----- -+ -The output should display `Matching` in the `stateComparison` column. -If they are not, wait and try again till matching. -+ -.Expected result -[queryresult] ----- -+----------------------------------------------------------------+ -| mode | stateComparison | v1ServerCount | v2ServerCount | -+----------------------------------------------------------------+ -| "V2_OVER_V1" | "Matching" | "6" | "6" | -+----------------------------------------------------------------+ ----- -+ -. Deallocate, drop, and shut down servers 4, 5, and 6. -+ -. Start up servers 10, 11, 12, this time with the setting `dbms.cluster.discovery.version=V2_ONLY`. -+ -image:discovery-service/v2_only.png[] -+ -The discovery addresses in the settings should include addresses of the new members, and the previous members. -Note that only the v2 settings are required. -+ -As an example, for those using the list resolver, the settings for the new servers should include: -+ -[source, parameters] ----- -dbms.cluster.discovery.resolver_type=LIST -dbms.cluster.discovery.version=V2_ONLY - -dbms.cluster.discovery.v2.endpoints=server07.example.com:6000,server08.example.com:6000,server09.example.com:6000,server10.example.com:6000,server11.example.com:6000,server12.example.com:6000 ----- -+ -. Deallocate, drop, and shut down servers 7, 8, 9. -+ -. Finally, using `bolt://`, connect to the system database of servers 10, 11, 12, and run the following procedure to check the version of the discovery service: -+ -[source,cypher] ----- -CALL dbms.cluster.showParallelDiscoveryState(); ----- -+ -.Expected result -[queryresult] ----- -+-------------------------------------------------------------+ -| mode | stateComparison | v1ServerCount | v2ServerCount | -+-------------------------------------------------------------+ -| "V2_ONLY" | "N/A" | "N/A" | "3" | -+-------------------------------------------------------------+ ----- - -== Monitoring the progress and metrics - -When moving from the current discovery service v1 to the new version v2, you can monitor the progress using the procedure `CALL dbms.cluster.showParallelDiscoveryState()`. -This procedure shows the current state of the discovery service on the server and the difference score between the states of the v1 and v2 discovery services. -The difference score is a measure of how different the states are. -The difference score reported by the procedure does not always stay at 0. -Here are some scenarios to consider: - -* In the case of a cluster, when some members are running just one of the discovery services (v1 or v2) and other members run both, the score will stay permanently high. -This is no reason for worry. - -* When changes happen in the cluster (like start/stop of a database/server or a leader switch) the difference score will temporarily be greater than 0. -It should reach 0 relatively fast again. - -* If the difference score is greater than 0 for a longer period, the actual difference is printed in the _debug.log_. - +== Metrics -You can also use the following metrics to monitor the discovery service: +You can use the following xref:monitoring/metrics/reference.adoc#discovery-service-metrics[discovery metrics] to monitor the discovery service. -* xref:monitoring/metrics/reference.adoc#discovery-service-V1[Discovery metrics v1] -* xref:monitoring/metrics/reference.adoc#metrics-discovery-v2[Discovery metrics v2] diff --git a/modules/ROOT/pages/clustering/setup/single-to-cluster.adoc b/modules/ROOT/pages/clustering/setup/single-to-cluster.adoc index 09fc80a1a..7fd17833c 100644 --- a/modules/ROOT/pages/clustering/setup/single-to-cluster.adoc +++ b/modules/ROOT/pages/clustering/setup/single-to-cluster.adoc @@ -16,11 +16,6 @@ See xref:clustering/setup/analytics-cluster.adoc[] for more information on analy .Move from a single `system` database to a cluster with three `system` primaries -[.tabbed-example] -===== -[role=include-with-Discovery-service-v2] -====== - In this example, a standalone server named `server01` is running and two additional servers, `server02` and `server03`, are to be added to form a cluster. The two additional servers are configured according to xref:clustering/setup/deploy.adoc#cluster-example-configure-a-three-primary-cluster[Configure a cluster with three servers] and are _not_ running. Neo4j Enterprise Edition is installed on all three servers. @@ -28,14 +23,6 @@ Neo4j Enterprise Edition is installed on all three servers. Start by stopping the standalone server. Once it is stopped, edit the xref:configuration/file-locations.adoc[_neo4j.conf_] file to include the discovery endpoints of itself and the servers that will form the cluster. -Starting with Neo4j 5.23, it is recommended to use v2 of the discovery service. -For more details on discovery services, see xref:clustering/setup/discovery.adoc[]. - -To use the discovery service v2: - -* You have to set the configuration of `dbms.cluster.discovery.version` to `V2_ONLY`. -* Instead of `dbms.cluster.discovery.endpoints`, use `dbms.cluster.discovery.v2.endpoints`. - The example below uses `dbms.cluster.discovery.resolver_type=LIST`. ._neo4j.conf_ on server01.example.com: @@ -43,68 +30,7 @@ The example below uses `dbms.cluster.discovery.resolver_type=LIST`. ---- server.default_listen_address=0.0.0.0 server.default_advertised_address=server01.example.com -dbms.cluster.discovery.v2.endpoints=server01.example.com:6000,server02.example.com:6000,server03.example.com:6000 -dbms.cluster.discovery.version=V2_ONLY -initial.dbms.default_primaries_count=3 ----- -(The xref:configuration/file-locations.adoc[_neo4j.conf_] file looks identical except for the `server.default_advertised_address` on all three servers. Please refer to xref:clustering/setup/deploy.adoc#cluster-example-configure-a-three-primary-cluster[Configure a cluster with three servers] for more information.) - -On `server01` (the standalone server) dump the `system` database using the `neo4j-admin database dump` command. - -[source, shell, role="nocopy"] ----- -bin/neo4j-admin database dump system --to-path=/full/path/to/dumps/ ----- -See xref:backup-restore/offline-backup.adoc[] for more information on the dump command. - -Use the `neo4j-admin database load` command to load the `system` database dump from `server01` to `server02` and `server03`. - -[source,shell, role="nocopy"] ----- -bin/neo4j-admin database load --from-path=/full-path/data/dumps system ----- -See xref:backup-restore/restore-dump.adoc[] for more information on the load command. - -Once the `system` database has been loaded on `server02` and `server03`, start all servers. -The newly added servers should be in the `Free` state (`server02` and `server03`) and this can be verified using `SHOW SERVERS`. - -[source, cypher, role=noplay] ----- -SHOW SERVERS; ----- - -[queryresult] ----- -+-----------------------------------------------------------------------------------------------------------+ -| name | address | state | health | hosting | -+-----------------------------------------------------------------------------------------------------------+ -| "d6fbe54b-0c6a-4959-9bcb-dcbbe80262a4" | "server01:7687" | "Enabled" | "Available" | ["system", "neo4j"] | -| "e56b49ea-243f-11ed-861d-0242ac120002" | "server02:7687" | "Free" | "Available" | ["system"] | -| "73e9a990-0a97-4a09-91e9-622bf0b239a4" | "server03:7687" | "Free" | "Available" | ["system"] | -+-----------------------------------------------------------------------------------------------------------+ ----- - -On `server01` (the previously standalone server) verify that all user databases are still running using `SHOW DATABASES`. - -The last step is to enable the `Free` servers using `ENABLE SERVER` (see xref:clustering/servers.adoc[] for more information on server states). - -Once all servers are enabled, you can scale up user databases using xref:clustering/databases.adoc#alter-topology[`ALTER DATABASE`], if desired. -====== -[role=include-with-Discovery-service-v1 label--deprecated-5.23] -====== - -In this example, a standalone server named `server01` is running and two additional servers, `server02` and `server03`, are to be added to form a cluster. -The two additional servers are configured according to xref:clustering/setup/deploy.adoc#cluster-example-configure-a-three-primary-cluster[Configure a cluster with three servers] and are _not_ running. -Neo4j Enterprise Edition is installed on all three servers. - -Start by stopping the standalone server and once it is stopped, edit the xref:configuration/file-locations.adoc[_neo4j.conf_] file to include the discovery endpoints of itself and the servers that will form the cluster. - -._neo4j.conf_ on server01.example.com: -[source, properties] ----- -server.default_listen_address=0.0.0.0 -server.default_advertised_address=server01.example.com -dbms.cluster.discovery.endpoints=server01.example.com:5000,server02.example.com:5000,server03.example.com:5000 +dbms.cluster.endpoints=server01.example.com:6000,server02.example.com:6000,server03.example.com:6000 initial.dbms.default_primaries_count=3 ---- (The xref:configuration/file-locations.adoc[_neo4j.conf_] file looks identical except for the `server.default_advertised_address` on all three servers. Please refer to xref:clustering/setup/deploy.adoc#cluster-example-configure-a-three-primary-cluster[Configure a cluster with three servers] for more information.) @@ -149,8 +75,3 @@ On `server01` (the previously standalone server) verify that all user databases The last step is to enable the `Free` servers using `ENABLE SERVER` (see xref:clustering/servers.adoc[] for more information on server states). Once all servers are enabled, you can scale up user databases using xref:clustering/databases.adoc#alter-topology[`ALTER DATABASE`], if desired. - -====== -===== - - diff --git a/modules/ROOT/pages/configuration/configuration-settings.adoc b/modules/ROOT/pages/configuration/configuration-settings.adoc index 8e26f9719..2707544dd 100644 --- a/modules/ROOT/pages/configuration/configuration-settings.adoc +++ b/modules/ROOT/pages/configuration/configuration-settings.adoc @@ -356,81 +356,22 @@ a|A duration (Valid units are: `ns`, `μs`, `ms`, `s`, `m`, `h` and `d`; default m|+++10m+++ |=== -[role=label--enterprise-edition label--deprecated-5.23] -[[config_dbms.cluster.discovery.endpoints]] -=== `dbms.cluster.discovery.endpoints` +[role=label--enterprise-edition label--renamed-2025.01] +[[config_dbms.cluster.endpoints]] +=== `dbms.cluster.endpoints` -.dbms.cluster.discovery.endpoints +.dbms.cluster.endpoints [frame="topbot", stripes=odd, grid="cols", cols="<1s,<4"] |=== |Description a|A comma-separated list of endpoints that a server should contact in order to discover other cluster members. Typically, all cluster members, including the current server, must be specified in this list. -The setting configures the endpoints for Discovery service V1. |Valid values a|A comma-separated list where each element is a socket address in the format of `hostname:port`, `hostname`, or `:port`. |Default value m| |=== -[role=label--enterprise-edition] -[[config_dbms.cluster.discovery.v2.endpoints]] -=== `dbms.cluster.discovery.v2.endpoints` - -.dbms.cluster.discovery.v2.endpoints -[frame="topbot", stripes=odd, grid="cols", cols="<1s,<4"] -|=== -|Description -a|A comma-separated list of endpoints that a server should contact in order to discover other cluster members. -Typically, all cluster members, including the current server, must be specified in this list. -The setting configures the endpoints for Discovery service V2. -|Valid values -a|A comma-separated list where each element is a socket address in the format of `hostname:port`, `hostname`, or `:port`. -|Default value -m| -|=== - -[role=label--enterprise-edition label--deprecated-5.26] -[[config_dbms.cluster.discovery.version]] -=== `dbms.cluster.discovery.version` - -.dbms.cluster.discovery.version -[frame="topbot", stripes=odd, grid="cols", cols="<1s,<4"] -|=== -|Description -a|This setting allows you to select which discovery service should be started. -Possible values are: - -* `V1_ONLY` -- it runs only discovery service v1. - -* `V1_OVER_V2` -- it runs both Discovery Service V1 and Discovery Service V2, where V1 is the main service and V2 runs in the background. - -* `V2_OVER_V1` -- it runs both Discovery Service V1 and Discovery Service V2, where V2 is the main service and V1 runs in the background. - -* `V2_ONLY` -- it runs only discovery service v2. -|Valid values -a|One of [V1_ONLY, V1_OVER_V2, V2_OVER_V1, V2_ONLY]. -|Default value -m|+++V1_ONLY+++ -|=== - - -[role=label--enterprise-edition label--deprecated-5.23] -[[config_dbms.cluster.discovery.log_level]] -=== `dbms.cluster.discovery.log_level` - -.dbms.cluster.discovery.log_level -[frame="topbot", stripes=odd, grid="cols", cols="<1s,<4"] -|=== -|Description -a|The level of middleware logging. -|Valid values -a|One of [DEBUG, INFO, WARN, ERROR, NONE]. -|Default value -m|+++WARN+++ -|=== - - [role=label--enterprise-edition] [[config_dbms.cluster.discovery.resolver_type]] === `dbms.cluster.discovery.resolver_type` @@ -443,37 +384,17 @@ a|Configure the resolver type that the discovery service uses for determining wh Valid values are `LIST`, `SRV`, `DNS`, and `K8S`: `LIST`:: - A static configuration where `dbms.cluster.discovery.endpoints` must contain a list of the addresses of the cluster members. + A static configuration where `dbms.cluster.endpoints` must contain a list of the addresses of the cluster members. `SRV` and `DNS`:: - A dynamic configuration where `dbms.cluster.discovery.endpoints` must point to a DNS entry containing the cluster members' addresses. + A dynamic configuration where `dbms.cluster.endpoints` must point to a DNS entry containing the cluster members' addresses. `K8S`:: - At least `dbms.kubernetes.service_port_name` must be set. The addresses of the cluster members are queried dynamically from Kubernetes. + At least `dbms.kubernetes.discovery.service_port_name` must be set. The addresses of the cluster members are queried dynamically from Kubernetes. |Valid values a|A string. |Default value m|+++LIST+++ |=== - -[role=label--enterprise-edition label--deprecated-5.7] -[[config_dbms.cluster.discovery.type]] -=== `dbms.cluster.discovery.type` - -.dbms.cluster.discovery.type -[frame="topbot", stripes=odd, grid="cols", cols="<1s,<4"] -|=== -|Description -a|This setting has been replaced by `dbms.cluster.discovery.resolver_type`. -|Valid values -a|One of [DNS, LIST, SRV, K8S]. -|Default value -m|+++LIST+++ -|=== - - -[[config_dbms.cluster.discovery.verification_timeout]] - - [role=label--enterprise-edition] [[config_dbms.cluster.minimum_initial_system_primaries_count]] === `dbms.cluster.minimum_initial_system_primaries_count` @@ -483,7 +404,7 @@ m|+++LIST+++ |=== |Description a|Minimum number of machines initially required to form a clustered DBMS. The cluster is considered formed when at least this many members have discovered each other, bound together, and bootstrapped a highly available system database. As a result, at least this many of the cluster's initial machines must have `<>` set to `PRIMARY`. + -NOTE: If `<>` is set to `LIST` and `<>` is empty, then the user is assumed to be deploying a standalone DBMS, and the value of this setting is ignored. +NOTE: If `<>` is set to `LIST` and `<>` is empty, then the user is assumed to be deploying a standalone DBMS, and the value of this setting is ignored. |Valid values a|An integer that is minimum `1`. |Default value @@ -566,7 +487,7 @@ m|++++++ [frame="topbot", stripes=odd, grid="cols", cols="<1s,<4"] |=== |Description -a|The time allowed for a database on a Neo4j server to either join a cluster or form a new cluster with at least the quorum of the members available. The members are provided by `<>` for the system database and by the topology graph for standard databases. +a|The time allowed for a database on a Neo4j server to either join a cluster or form a new cluster with at least the quorum of the members available. The members are provided by `<>` for the system database and by the topology graph for standard databases. |Valid values a|A duration (Valid units are: `ns`, `μs`, `ms`, `s`, `m`, `h` and `d`; default unit is `s`). |Default value @@ -3576,11 +3497,11 @@ m|+++/var/run/secrets/kubernetes.io/serviceaccount/namespace+++ |=== -[role=label--enterprise-edition label--deprecated-5.23] -[[config_dbms.kubernetes.service_port_name]] -=== `dbms.kubernetes.service_port_name` +[role=label--enterprise-edition label--renamed-2025.01] +[[config_dbms.kubernetes.discovery.service_port_name]] +=== `dbms.kubernetes.discovery.service_port_name` -.dbms.kubernetes.service_port_name +.dbms.kubernetes.discovery.service_port_name [frame="topbot", stripes=odd, grid="cols", cols="<1s,<4"] |=== |Description @@ -3588,24 +3509,10 @@ a|Service port name for discovery for Kubernetes API. |Valid values a|A string. |Default value -m| -|=== - -[role=label--enterprise-edition] -[[config_dbms.kubernetes.discovery.v2.service_port_name]] -=== `dbms.kubernetes.discovery.v2.service_port_name` - -.dbms.kubernetes.discovery.v2.service_port_name -[frame="topbot", stripes=odd, grid="cols", cols="<1s,<4"] -|=== -|Description -a|Service port name for Discovery v2 for Kubernetes API. -|Valid values -a|A string. -|Default value m|+++transaction+++ |=== + [role=label--enterprise-edition] [[config_dbms.kubernetes.token]] === `dbms.kubernetes.token` @@ -3621,7 +3528,6 @@ a|A path. m|+++/var/run/secrets/kubernetes.io/serviceaccount/token+++ |=== - == Security settings The security settings are used to configure the security of your Neo4j deployment. diff --git a/modules/ROOT/pages/configuration/ports.adoc b/modules/ROOT/pages/configuration/ports.adoc index d6a325a13..090b7a769 100644 --- a/modules/ROOT/pages/configuration/ports.adoc +++ b/modules/ROOT/pages/configuration/ports.adoc @@ -26,7 +26,6 @@ The table below shows an overview of available Neo4j-specific ports and related | HTTP | `7474` | `xref:configuration/configuration-settings.adoc#config_server.http.listen_address[server.http.listen_address]` | HTTPS | `7473` | `xref:configuration/configuration-settings.adoc#config_server.https.listen_address[server.https.listen_address]` | Bolt | `7687` | `xref:configuration/configuration-settings.adoc#config_server.bolt.listen_address[server.bolt.listen_address]` -| Cluster discovery v1 | `5000` | `xref:configuration/configuration-settings.adoc#config_server.discovery.listen_address[server.discovery.listen_address]` label:deprecated[Deprecated in 5.23] | Cluster internal traffic | `6000` | `xref:configuration/configuration-settings.adoc#config_server.cluster.listen_address[server.cluster.listen_address]` | Cluster RAFT | `7000` | `xref:configuration/configuration-settings.adoc#config_server.cluster.raft.listen_address[server.cluster.raft.listen_address]` | Cluster routing connector | `7688` | `xref:configuration/configuration-settings.adoc#config_server.routing.listen_address[server.routing.listen_address]` @@ -55,8 +54,7 @@ The table below shows an overview of available Neo4j-specific ports and related | HTTP | `7474` | `xref:configuration/configuration-settings.adoc#config_server.http.advertised_address[server.http.advertised_address]` | HTTPS | `7473` | `xref:configuration/configuration-settings.adoc#config_server.https.advertised_address[server.https.advertised_address]` | Bolt | `7687` | `xref:configuration/configuration-settings.adoc#config_server.bolt.advertised_address[server.bolt.advertised_address]` -| Cluster discovery v1 | `5000` | `xref:configuration/configuration-settings.adoc#config_server.discovery.advertised_address[server.discovery.advertised_address]` label:deprecated[Deprecated in 5.23] -| 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. See xref:clustering/setup/discovery.adoc[] for more details. +| Cluster internal traffic | `6000` | `xref:configuration/configuration-settings.adoc#config_server.cluster.advertised_address[server.cluster.advertised_address]` | Cluster RAFT | `7000` | `xref:configuration/configuration-settings.adoc#config_server.cluster.raft.advertised_address[server.cluster.raft.advertised_address]` | Cluster routing connector | `7688` | `xref:configuration/configuration-settings.adoc#config_server.routing.advertised_address[server.routing.advertised_address]` |=== @@ -190,11 +188,15 @@ For more information, see xref:configuration/connectors.adoc[]. All instances of Neo4j Enterprise will open these ports, whether or not they are currently in a multi-process configuration. +[NOTE] +==== +From Neo4j 2025.01, port 5000 is no longer used. +==== + .Cluster listen address [options="header"] |=== | Name | Default port | Default value | Related configuration setting -| Discovery v1 | `5000` | `:5000` | `xref:configuration/configuration-settings.adoc#config_server.discovery.listen_address[server.discovery.listen_address]` label:deprecated[Deprecated in 5.23] | Internal traffic | `6000` | `:6000` | `xref:configuration/configuration-settings.adoc#config_server.cluster.listen_address[server.cluster.listen_address]` See xref:clustering/setup/discovery.adoc[]. | RAFT | `7000` | `:7000` | `xref:configuration/configuration-settings.adoc#config_server.cluster.raft.listen_address[server.cluster.raft.listen_address]` | Routing connector | `7688` | `:7688` | `xref:configuration/configuration-settings.adoc#config_server.routing.listen_address[server.routing.listen_address]` @@ -205,7 +207,6 @@ All instances of Neo4j Enterprise will open these ports, whether or not they are [options="header"] |=== | Name | Default port | Default value | Related configuration setting -| Discovery v1 | `5000` | `:5000` | `xref:configuration/configuration-settings.adoc#config_server.discovery.advertised_address[server.discovery.advertised_address]` label:deprecated[Deprecated in 5.23] | 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. See xref:clustering/setup/discovery.adoc[]. | RAFT | `7000` | `:7000` | `xref:configuration/configuration-settings.adoc#config_server.cluster.raft.advertised_address[server.cluster.raft.advertised_address]` | Routing connector | `7688` | `:7688` | `xref:configuration/configuration-settings.adoc#config_server.routing.advertised_address[server.routing.advertised_address]` diff --git a/modules/ROOT/pages/docker/clustering.adoc b/modules/ROOT/pages/docker/clustering.adoc index 31db8d0cb..80484fac8 100644 --- a/modules/ROOT/pages/docker/clustering.adoc +++ b/modules/ROOT/pages/docker/clustering.adoc @@ -30,10 +30,9 @@ Example of a `docker run` command for invoking a cluster member: docker run --name=server1 --detach \ --network=host \ --publish=7474:7474 --publish=7687:7687 \ - --publish=5000:5000 --publish=6000:6000 --publish=7000:7000 \ + --publish=6000:6000 --publish=7000:7000 \ --hostname=public-address \ - --env NEO4J_dbms_cluster_discovery_endpoints=server1-public-address:5000,server2-public-address:5000,server3-public-address:5000 \ - --env NEO4J_server_discovery_advertised_address=public-address:5000 \ + --env NEO4J_dbms_cluster_endpoints=server1-public-address:6000,server2-public-address:6000,server3-public-address:6000 \ --env NEO4J_server_cluster_advertised_address=public-address:6000 \ --env NEO4J_server_cluster.raft.advertised_address=public-address:7000 \ --env NEO4J_server_default_advertised_address=public-address \ diff --git a/modules/ROOT/pages/docker/ref-settings.adoc b/modules/ROOT/pages/docker/ref-settings.adoc index a70675f35..99d3117bc 100644 --- a/modules/ROOT/pages/docker/ref-settings.adoc +++ b/modules/ROOT/pages/docker/ref-settings.adoc @@ -220,11 +220,8 @@ For more information on the configuration descriptions, valid values, and defaul | `dbms.cluster.catchup.client_inactivity_timeout` | `+NEO4J_dbms_cluster_catchup_client__inactivity__timeout+` -| `dbms.cluster.discovery.endpoints` -| `+NEO4J_dbms_cluster_discovery_endpoints+` - -| `dbms.cluster.discovery.log_level` -| `+NEO4J_dbms_cluster_discovery_log__level+` +| `dbms.cluster.endpoints` +| `+NEO4J_dbms_cluster_endpoints+` | `dbms.cluster.discovery.resolver_type` | `+NEO4J_dbms_cluster_discovery_resolver__type+` @@ -724,12 +721,6 @@ For more information on the configuration descriptions, valid values, and defaul | `server.directories.transaction.logs.root` | `+NEO4J_server_directories_transaction_logs_root+` -| `server.discovery.advertised_address` -| `+NEO4J_server_discovery_advertised__address+` - -| `server.discovery.listen_address` -| `+NEO4J_server_discovery_listen__address+` - | `server.dynamic.setting.allowlist` | `+NEO4J_server_dynamic_setting_allowlist+` diff --git a/modules/ROOT/pages/kubernetes/configuration.adoc b/modules/ROOT/pages/kubernetes/configuration.adoc index 1d65c6724..c3d21701c 100644 --- a/modules/ROOT/pages/kubernetes/configuration.adoc +++ b/modules/ROOT/pages/kubernetes/configuration.adoc @@ -660,10 +660,6 @@ ssl: # Kubernetes cluster domain suffix clusterDomain: "cluster.local" -# Discovery version, possible values are V1_ONLY, V1_OVER_V2, V2_OVER_V1, V2_ONLY -discoveryVersion: "V1_ONLY" - - # Override image settings in Neo4j pod image: imagePullPolicy: IfNotPresent diff --git a/modules/ROOT/pages/kubernetes/multi-dc-cluster/aks.adoc b/modules/ROOT/pages/kubernetes/multi-dc-cluster/aks.adoc index 466f2ada5..a4962fd1b 100644 --- a/modules/ROOT/pages/kubernetes/multi-dc-cluster/aks.adoc +++ b/modules/ROOT/pages/kubernetes/multi-dc-cluster/aks.adoc @@ -503,8 +503,7 @@ services: multiCluster: true config: dbms.cluster.discovery.resolver_type: LIST - dbms.cluster.discovery.endpoints: "10.30.1.101:5000, 10.30.2.101:5000, 10.30.3.101:5000" - server.discovery.advertised_address: "10.30.1.101:5000" + dbms.cluster.endpoints: "10.30.1.101:6000, 10.30.2.101:6000, 10.30.3.101:6000" server.cluster.advertised_address: "10.30.1.101:6000" server.cluster.raft.advertised_address: "10.30.1.101:7000" server.bolt.advertised_address: "10.30.1.101:7687" @@ -531,8 +530,7 @@ services: multiCluster: true config: dbms.cluster.discovery.resolver_type: LIST - dbms.cluster.discovery.endpoints: "10.30.1.101:5000, 10.30.2.101:5000, 10.30.3.101:5000" - server.discovery.advertised_address: "10.30.2.101:5000" + dbms.cluster.endpoints: "10.30.1.101:6000, 10.30.2.101:6000, 10.30.3.101:6000" server.cluster.advertised_address: "10.30.2.101:6000" server.cluster.raft.advertised_address: "10.30.2.101:7000" server.bolt.advertised_address: "10.30.2.101:7687" @@ -559,8 +557,7 @@ services: multiCluster: true config: dbms.cluster.discovery.resolver_type: LIST - dbms.cluster.discovery.endpoints: "10.30.1.101:5000, 10.30.2.101:5000, 10.30.3.101:5000" - server.discovery.advertised_address: "10.30.3.101:5000" + dbms.cluster.endpoints: "10.30.1.101:6000, 10.30.2.101:6000, 10.30.3.101:6000" server.cluster.advertised_address: "10.30.3.101:6000" server.cluster.raft.advertised_address: "10.30.3.101:7000" server.bolt.advertised_address: "10.30.3.101:7687" diff --git a/modules/ROOT/pages/monitoring/metrics/reference.adoc b/modules/ROOT/pages/monitoring/metrics/reference.adoc index ae823af44..51697d18b 100644 --- a/modules/ROOT/pages/monitoring/metrics/reference.adoc +++ b/modules/ROOT/pages/monitoring/metrics/reference.adoc @@ -416,27 +416,10 @@ label:deprecated[Deprecated in 5.15] |.cluster.catchup.tx_pull_requests_received|TX pull requests received from other cluster members. (counter) |=== -[role=label--deprecated-5.23] -[[discovery-service-V1]] -=== Discovery metrics v1 +[[discovery-service-metrics]] +=== Discovery metrics -.Discovery service V1 - -[options="header",cols="<3m,<4"] -|=== -|Name |Description -|.cluster.discovery.replicated_data|Size of replicated data structures. (gauge) -|.cluster.discovery.cluster.members|Discovery cluster member size. (gauge) -|.cluster.discovery.cluster.unreachable|Discovery cluster unreachable size. (gauge) -|.cluster.discovery.cluster.converged|Discovery cluster convergence. (gauge) -|.cluster.discovery.restart.success_count|Discovery restart count. (gauge) -|.cluster.discovery.restart.failed_count|Discovery restart failed count. (gauge) -|=== - -[[discovery-service-V2]] -=== Discovery metrics v2 - -.Discovery service V2 +.Discovery service [options="header",cols="<3m,<4"] |=== |Name |Description diff --git a/modules/ROOT/pages/security/ssl-framework.adoc b/modules/ROOT/pages/security/ssl-framework.adoc index 09e0a9875..cd6b72b0a 100644 --- a/modules/ROOT/pages/security/ssl-framework.adoc +++ b/modules/ROOT/pages/security/ssl-framework.adoc @@ -7,18 +7,12 @@ The SSL framework provides support for securing the following Neo4j communicatio * `bolt` (port - `7687`) * `https` (port - `7473`) -* `cluster` (ports - `5000`, `6000`, `7000`, and `7688`) +* `cluster` (ports - `6000`, `7000`, and `7688`) + +Note that port `5000` is no longer used from Neo4j 2025.01 onwards. * `backups` (port - `6362`) This page describes how to set up SSL within your environment, how to view, validate, and test the certificates. -[NOTE] -==== -As of Neo4j 5.23, the use of port `5000` for discovery management and discovery service v1 is deprecated. -Discovery service v2 uses the port `6000`. -For more details, refer to xref:clustering/setup/discovery.adoc[Clustering -> Cluster server discovery]. -==== - [[ssl-providers]] == SSL Providers @@ -694,9 +688,8 @@ openssl s_client -connect my_domain.com:7473 === Configure SSL for intra-cluster communications Intra-cluster encryption is the security solution for the cluster communication. -The Neo4j cluster communicates on 4 ports: +The Neo4j cluster communicates on 3 ports: -* 5000 - Discovery management * 6000 - Transactions * 7000 - Raft communications * 7688 - Server side routing diff --git a/modules/ROOT/pages/tutorial/tutorial-clustering-docker.adoc b/modules/ROOT/pages/tutorial/tutorial-clustering-docker.adoc index 4b4207022..a1297a3e7 100644 --- a/modules/ROOT/pages/tutorial/tutorial-clustering-docker.adoc +++ b/modules/ROOT/pages/tutorial/tutorial-clustering-docker.adoc @@ -34,10 +34,6 @@ For more information, see the https://docs.docker.com/compose/install/[Install D . 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`) + -[.tabbed-example] -===== -[role=include-with-discovery-service-v2] -====== [source,shell,subs="attributes+, +macros"] ---- # Setting that specifies how much memory Neo4j is allowed to use for the page cache. @@ -46,20 +42,16 @@ server.memory.pagecache.size=100M # Setting that specifies the initial JVM heap size. server.memory.heap.initial_size=100M -# 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`. +# The behavior of the discovery service is determined by the parameters `dbms.cluster.discovery.resolver_type` and `dbms.cluster.endpoints` # The DNS strategy fetches the IP addresses of the cluster members using the DNS A records. dbms.cluster.discovery.resolver_type=DNS -# The value of `dbms.cluster.discovery.version` must be set to `V2_ONLY` if you want to use the discovery service v2. -# The discovery service v2 utilizes the port `6000`. -dbms.cluster.discovery.version=V2_ONLY - -# The value of `dbms.cluster.discovery.v2.endpoints` should be set to a single domain name and the port of the discovery service. +# The value of `dbms.cluster.endpoints` should be set to a single domain name and the port of the discovery service. # The domain name returns an A record for every server in the cluster when a DNS lookup is performed. # Each A record returned by DNS should contain the IP address of the server in the cluster. # The configured server uses all the IP addresses from the A records to join or form a cluster. # The discovery port must be the same on all servers when using this configuration. -dbms.cluster.discovery.v2.endpoints=neo4j-network:6000 +dbms.cluster.endpoints=neo4j-network:6000 # Address (the public hostname/IP address of the machine) # and port setting that specifies where this instance advertises for discovery protocol messages from other members of the cluster. @@ -81,51 +73,6 @@ server.routing.advertised_address=$(hostname) # Automatically enable servers, rather than needing to explicitly do so for Free servers initial.dbms.automatically_enable_free_servers=true ---- -====== -[role=include-with-discovery-service-v1 label--deprecated-5.23] -====== -[source,shell,subs="attributes+, +macros"] ----- -# Setting that specifies how much memory Neo4j is allowed to use for the page cache. -server.memory.pagecache.size=100M - -# Setting that specifies the initial JVM heap size. -server.memory.heap.initial_size=100M - -# The behavior of the initial discovery is determined by the parameters `dbms.cluster.discovery.resolver_type` and `dbms.cluster.discovery.endpoints`. -# The DNS strategy fetches the IP addresses of the cluster members using the DNS A records. -dbms.cluster.discovery.resolver_type=DNS - -# The value of `dbms.cluster.discovery.endpoints` should be set to a single domain name and the port of the discovery service. -# The domain name returns an A record for every server in the cluster when a DNS lookup is performed. -# Each A record returned by DNS should contain the IP address of the server in the cluster. -# The configured server uses all the IP addresses from the A records to join or form a cluster. -# The discovery port must be the same on all servers when using this configuration. -dbms.cluster.discovery.endpoints=neo4j-network:5000 - -# Address (the public hostname/IP address of the machine) -# and port setting that specifies where this instance advertises for discovery protocol messages from other members of the cluster. -server.discovery.advertised_address=$(hostname -i) - -# Address (the public hostname/IP address of the machine) -# and port setting that specifies where this instance advertises for Raft messages within the cluster. -server.cluster.raft.advertised_address=$(hostname) - - # Address (the public hostname/IP address of the machine) - # and port setting that specifies where this instance advertises for requests for transactions in the transaction-shipping catch-up protocol. -server.cluster.advertised_address=$(hostname) - -# Enable server-side routing -dbms.routing.enabled=true - -# Use server-side routing for neo4j:// protocol connections. -dbms.routing.default_router=SERVER - -# The advertised address for the intra-cluster routing connector. -server.routing.advertised_address=$(hostname) ----- -====== -===== . Prepare your _docker-compose.yml_ file using the following example. For more information, see the https://docs.docker.com/compose/compose-file/#service-configuration-reference[Docker Compose official Service configuration reference]. @@ -314,7 +261,7 @@ image:show-servers-docker.png[] == Deploy a Neo4j Cluster using environment variables You can set up containers in a cluster to talk to each other using environment variables. -Each container must have a network route to each of the others, the `+NEO4J_initial_dbms_default__primaries__count+`, `+NEO4J_initial_dbms_default__secondaries__count+`, and `+NEO4J_dbms_cluster_discovery_endpoints+` environment variables must be set for all servers. +Each container must have a network route to each of the others, the `+NEO4J_initial_dbms_default__primaries__count+`, `+NEO4J_initial_dbms_default__secondaries__count+`, and `+NEO4J_dbms_cluster_endpoints+` environment variables must be set for all servers. [role=enterprise-edition] [[docker-enterprise-edition-environment-variables]] @@ -323,12 +270,9 @@ Each container must have a network route to each of the others, the `+NEO4J_init The following environment variables are specific to the Neo4j cluster, and are available in the Neo4j Enterprise Edition: * `+NEO4J_initial_server_mode__constraint+`: the database mode, defaults to `NONE`, can be set to `PRIMARY` or `SECONDARY`. -* `+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] -* `+NEO4J_dbms_cluster_discovery_v2_endpoints+`: a comma-separated list of endpoints, which a server should contact to discover other cluster servers. -* `+NEO4J_server_discovery_advertised_address+`: hostname/IP address and port to advertise for member discovery management communication. label:deprecated[Deprecated in 5.23] +* `+NEO4J_dbms_cluster_endpoints+`: a comma-separated list of endpoints, which a server should contact to discover other cluster servers. * `+NEO4J_server.cluster.advertised_address+`: hostname/IP address and port to advertise for transaction handling and v2 discovery. * `+NEO4J_server.cluster.raft.advertised_address+`: hostname/IP address and port to advertise for cluster communication. -* `+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`. See xref:clustering/settings.adoc[] for more details of Neo4j cluster settings. @@ -340,54 +284,6 @@ For each container, these ports are mapped to a different set of ports on the Do Example of a `docker run` command for deploying a cluster with three servers: -[.tabbed-example] -===== -[role=include-with-discovery-service-v2] -====== -[source,shell,subs="attributes"] ----- -docker network create --driver=bridge neo4j-cluster - -docker run --name=server1 --detach --network=neo4j-cluster \ - --publish=7474:7474 --publish=7473:7473 --publish=7687:7687 \ - --hostname=server1 \ - --env NEO4J_initial_server_mode__constraint=PRIMARY \ - --env NEO4J_dbms_cluster_discovery_version=V2_ONLY \ - --env NEO4J_dbms_cluster_discovery_v2_endpoints=server1:6000,server2:6000,server3:6000 \ - --env NEO4J_ACCEPT_LICENSE_AGREEMENT=yes \ - --env NEO4J_server_bolt_advertised__address=localhost:7687 \ - --env NEO4J_server_http_advertised__address=localhost:7474 \ - --env NEO4J_AUTH=neo4j/your_password \ - neo4j:{neo4j-version-exact}-enterprise - -docker run --name=server2 --detach --network=neo4j-cluster \ - --publish=8474:7474 --publish=8473:7473 --publish=8687:7687 \ - --hostname=server2 \ - --env NEO4J_initial_server_mode__constraint=PRIMARY \ - --env NEO4J_dbms_cluster_discovery_version=V2_ONLY \ - --env NEO4J_dbms_cluster_discovery_v2_endpoints=server1:6000,server2:6000,server3:6000 \ - --env NEO4J_ACCEPT_LICENSE_AGREEMENT=yes \ - --env NEO4J_server_bolt_advertised__address=localhost:8687 \ - --env NEO4J_server_http_advertised__address=localhost:8474 \ - --env NEO4J_AUTH=neo4j/your_password \ - neo4j:{neo4j-version-exact}-enterprise - -docker run --name=server3 --detach --network=neo4j-cluster \ - --publish=9474:7474 --publish=9473:7473 --publish=9687:7687 \ - --hostname=server3 \ - --env NEO4J_initial_server_mode__constraint=PRIMARY \ - --env NEO4J_dbms_cluster_discovery_version=V2_ONLY \ - --env NEO4J_dbms_cluster_discovery_v2_endpoints=server1:6000,server2:6000,server3:6000 \ - --env NEO4J_ACCEPT_LICENSE_AGREEMENT=yes \ - --env NEO4J_server_bolt_advertised__address=localhost:9687 \ - --env NEO4J_server_http_advertised__address=localhost:9474 \ - --env NEO4J_AUTH=neo4j/your_password \ - neo4j:{neo4j-version-exact}-enterprise ----- -====== -[role=include-with-discovery-service-v1 label--deprecated-5.23] -====== - [source,shell,subs="attributes"] ---- docker network create --driver=bridge neo4j-cluster @@ -396,7 +292,7 @@ docker run --name=server1 --detach --network=neo4j-cluster \ --publish=7474:7474 --publish=7473:7473 --publish=7687:7687 \ --hostname=server1 \ --env NEO4J_initial_server_mode__constraint=PRIMARY \ - --env NEO4J_dbms_cluster_discovery_endpoints=server1:5000,server2:5000,server3:5000 \ + --env NEO4J_dbms_cluster_endpoints=server1:6000,server2:6000,server3:6000 \ --env NEO4J_ACCEPT_LICENSE_AGREEMENT=yes \ --env NEO4J_server_bolt_advertised__address=localhost:7687 \ --env NEO4J_server_http_advertised__address=localhost:7474 \ @@ -407,7 +303,7 @@ docker run --name=server2 --detach --network=neo4j-cluster \ --publish=8474:7474 --publish=8473:7473 --publish=8687:7687 \ --hostname=server2 \ --env NEO4J_initial_server_mode__constraint=PRIMARY \ - --env NEO4J_dbms_cluster_discovery_endpoints=server1:5000,server2:5000,server3:5000 \ + --env NEO4J_dbms_cluster_endpoints=server1:6000,server2:6000,server3:6000 \ --env NEO4J_ACCEPT_LICENSE_AGREEMENT=yes \ --env NEO4J_server_bolt_advertised__address=localhost:8687 \ --env NEO4J_server_http_advertised__address=localhost:8474 \ @@ -418,55 +314,27 @@ docker run --name=server3 --detach --network=neo4j-cluster \ --publish=9474:7474 --publish=9473:7473 --publish=9687:7687 \ --hostname=server3 \ --env NEO4J_initial_server_mode__constraint=PRIMARY \ - --env NEO4J_dbms_cluster_discovery_endpoints=server1:5000,server2:5000,server3:5000 \ + --env NEO4J_dbms_cluster_endpoints=server1:6000,server2:6000,server3:6000 \ --env NEO4J_ACCEPT_LICENSE_AGREEMENT=yes \ --env NEO4J_server_bolt_advertised__address=localhost:9687 \ --env NEO4J_server_http_advertised__address=localhost:9474 \ --env NEO4J_AUTH=neo4j/your_password \ neo4j:{neo4j-version-exact}-enterprise ---- -====== -===== - Additional servers can be added to the cluster in an ad-hoc fashion. Example of a `docker run` command for adding a fourth server with a role `SECONDARY` to the cluster: -[.tabbed-example] -===== -[role=include-with-discovery-service-v2] -====== - [source,shell,subs="attributes"] ---- docker run --name=read-server4 --detach --network=neo4j-cluster \ --publish=10474:7474 --publish=10473:7473 --publish=10687:7687 \ --hostname=read-server4 \ --env NEO4J_initial_server_mode__constraint=SECONDARY \ - --env NEO4J_dbms_cluster_discovery_version=V2_ONLY \ - --env NEO4J_dbms_cluster_discovery_v2_endpoints=server1:6000,server2:6000,server3:6000 \ + --env NEO4J_dbms_cluster_endpoints=server1:6000,server2:6000,server3:6000 \ --env NEO4J_ACCEPT_LICENSE_AGREEMENT=yes \ --env NEO4J_server_bolt_advertised__address=localhost:10687 \ --env NEO4J_server_http_advertised__address=localhost:10474 \ neo4j:{neo4j-version-exact}-enterprise ---- -====== -[role=include-with-discovery-service-v1 label--deprecated-5.23] -====== - -[source,shell,subs="attributes"] ----- -docker run --name=read-server4 --detach --network=neo4j-cluster \ - --publish=10474:7474 --publish=10473:7473 --publish=10687:7687 \ - --hostname=read-server4 \ - --env NEO4J_initial_server_mode__constraint=SECONDARY \ - --env NEO4J_dbms_cluster_discovery_endpoints=server1:5000,server2:5000,server3:5000 \ - --env NEO4J_ACCEPT_LICENSE_AGREEMENT=yes \ - --env NEO4J_server_bolt_advertised__address=localhost:10687 \ - --env NEO4J_server_http_advertised__address=localhost:10474 \ - neo4j:{neo4j-version-exact}-enterprise ----- - -====== -=====