Skip to content

Commit 9ed87b7

Browse files
Clarify situation when enabling newly added servers
1 parent b4a5f48 commit 9ed87b7

File tree

6 files changed

+149
-55
lines changed

6 files changed

+149
-55
lines changed

modules/ROOT/pages/changes-deprecations-removals.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@ Instead use the value of xref:configuration/configuration-settings.adoc#config_s
143143
Instead use the value of xref:configuration/configuration-settings.adoc#config_server.cluster.listen_address[`server.cluster.listen_address`].
144144
145145
|link:{neo4j-docs-base-uri}/operations-manual/5/configuration/configuration-settings#config_server.groups[server.groups] label:enterprise[Enterprise Edition]
146-
|Replaced by xref:configuration/configuration-settings.adoc#config_server.tags[`initial.server.tags`].
146+
|Replaced by xref:configuration/configuration-settings.adoc#config_initial.server.tags[`initial.server.tags`].
147147
148148
|link:{neo4j-docs-base-uri}/operations-manual/5/configuration/configuration-settings#config_server.memory.off_heap.block_cache_size[server.memory.off_heap.block_cache_size]
149149
|Removed without replacement.

modules/ROOT/pages/clustering/multi-region-deployment/multi-data-center-routing.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ Applying the same tag to multiple servers logically groups them together.
5757
Note that servers can have mulitple tags.
5858

5959
Server tags are defined as a key that maps onto a set of servers in a cluster.
60-
Server tags are defined on each server using the xref:configuration/configuration-settings.adoc#config_server.tags[`initial.server.tags`] parameter in _neo4j.conf_.
60+
Server tags are defined on each server using the xref:configuration/configuration-settings.adoc#config_initial.server.tags[`initial.server.tags`] parameter in _neo4j.conf_.
6161
Each server in a cluster can be tagged with to zero or more server tags.
6262
Server tags can be altered at runtime via the `ALTER SERVER` command,
6363
see xref:clustering/servers.adoc#alter-server-options[Altering server options] for more details.

modules/ROOT/pages/clustering/servers.adoc

Lines changed: 25 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,19 @@ When first discovered, a server's name defaults to the value of its generated se
3737
[[server-enabled-state]]
3838
=== Enabled state
3939

40-
A server in the free state needs to be explicitly enabled in order to be considered an active member of the cluster.
41-
The command `ENABLE SERVER server name` is used to transition a server into this _Enabled_ state.
40+
When you deploy a cluster for the first time, all servers included in the initial deployment are automatically enabled.
41+
For details, refer to the example on how to xref:clustering/setup/deploy.adoc#cluster-example-configure-a-three-primary-cluster[Configure a cluster with three servers].
42+
43+
If you add a new server after the cluster is already running, the server is added in the `FREE` state.
44+
A server in the `FREE` state needs to be explicitly enabled in order to be considered an active member of the cluster.
45+
46+
To transition a server into the _Enabled_ state, use the command `ENABLE SERVER`:
47+
48+
[source, syntax, role=noheader]
49+
----
50+
ENABLE SERVER 'serverId' [OPTIONS "{" option: value[,...] "}"]
51+
----
52+
4253
The server's initial name is its ID.
4354
If the server is already enabled and the command is executed with the same options, nothing is changed.
4455

@@ -72,11 +83,22 @@ This may not be specified in combination with `allowedDatabases`.
7283

7384
[NOTE]
7485
====
75-
When a server is enabled, if no `OPTIONS` are not provided, the default server values are taken from the settings `initial.server.mode_constraint`, `initial.server.allowed_databases`, `initial.server.denied_databases`, and/or `initial.server.tags`.
86+
When a server is enabled, if no `OPTIONS` are not provided, the default server's values are taken from the settings:
87+
88+
* xref:configuration/configuration-settings.adoc#config_initial.server.mode_constraint[`initial.server.mode_constraint`]
89+
* xref:configuration/configuration-settings.adoc#config_initial.server.allowed_databases[`initial.server.allowed_databases`]
90+
* xref:configuration/configuration-settings.adoc#config_initial.server.denied_databases[`initial.server.denied_databases`]
91+
* and/or xref:configuration/configuration-settings.adoc#config_initial.server.tags[`initial.server.tags`]
92+
93+
All these settings are only effective on the first startup of the DBMS.
7694
====
7795

96+
Another option to enable a server is to set xref:configuration/configuration-settings.adoc#config_initial.dbms.automatically_enable_free_servers[`initial.dbms.automatically_enable_free_servers`] to `true`.
97+
7898
Once enabled, the server may be allocated databases to host.
7999

100+
If you need to change some of the server's values, use the <<alter-server-options, `ALTER SERVER`>> command.
101+
80102

81103

82104
[[deallocating-state]]

modules/ROOT/pages/clustering/setup/analytics-cluster.adoc

Lines changed: 88 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -16,44 +16,43 @@ Bear in mind that the GDS library does **not** support fault tolerance and there
1616
=== Deploy the cluster
1717

1818

19-
.Configure a cluster with five servers, two only for read queries
20-
21-
22-
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.
19+
. Configure a cluster with five servers, two only for read queries
20+
+
21+
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.
2322
Two more servers names `server04.example.com` and `server05.example.com` are configured for the analytical queries.
2423
Neo4j Enterprise Edition is installed on all five servers.
2524
They are configured by preparing xref:configuration/file-locations.adoc[_neo4j.conf_] on each server.
26-
25+
+
2726
Key points:
28-
27+
+
2928
* All servers include _all_ members in their discovery list.
30-
* The servers for analytics have mode constraints configured that restrict their hosting mode to _secondary_ to prevent them from participating in normal write operations.
29+
* The servers for analytics have their mode constraints configured to _SECONDARY_ to prevent them from participating in write operations.
3130
* In the example below, you set `dbms.cluster.discovery.resolver_type=LIST`.
32-
31+
+
3332
._neo4j.conf_ on server01.example.com:
3433
[source, properties]
3534
----
3635
server.default_listen_address=0.0.0.0
3736
server.default_advertised_address=server01.example.com
3837
dbms.cluster.endpoints=server01.example.com:6000,server02.example.com:6000,server03.example.com:6000,server04.example.com:6000,server05.example.com:6000
3938
----
40-
39+
+
4140
._neo4j.conf_ on server02.example.com:
4241
[source, properties]
4342
----
4443
server.default_listen_address=0.0.0.0
4544
server.default_advertised_address=server02.example.com
4645
dbms.cluster.endpoints=server01.example.com:6000,server02.example.com:6000,server03.example.com:6000,server04.example.com:6000,server05.example.com:6000
4746
----
48-
47+
+
4948
._neo4j.conf_ on server03.example.com:
5049
[source, properties]
5150
----
5251
server.default_listen_address=0.0.0.0
5352
server.default_advertised_address=server03.example.com
5453
dbms.cluster.endpoints=server01.example.com:6000,server02.example.com:6000,server03.example.com:6000,server04.example.com:6000,server05.example.com:6000
5554
----
56-
55+
+
5756
._neo4j.conf_ on server04.example.com - an analytics server:
5857
[source, properties]
5958
----
@@ -63,7 +62,7 @@ dbms.cluster.endpoints=server01.example.com:6000,server02.example.com:6000,serve
6362
initial.server.mode_constraint=SECONDARY
6463
server.cluster.system_database_mode=SECONDARY
6564
----
66-
65+
+
6766
._neo4j.conf_ on server05.example.com - an analytics server:
6867
[source, properties]
6968
----
@@ -74,37 +73,37 @@ initial.server.mode_constraint=SECONDARY
7473
server.cluster.system_database_mode=SECONDARY
7574
----
7675

77-
The Neo4j servers are ready to be started.
76+
. The Neo4j servers are ready to be started.
7877
The startup order does not matter.
7978

80-
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.
79+
. 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.
8180
This shows information about each member of the cluster:
82-
81+
+
8382
[source, cypher, role=noplay]
8483
----
8584
SHOW SERVERS;
8685
----
87-
86+
+
8887
[queryresult]
8988
----
90-
+-----------------------------------------------------------------------------------------------------------+
91-
| name | address | state | health | hosting |
92-
+-----------------------------------------------------------------------------------------------------------+
89+
+----------------------------------------------------------------------------------------------------------+
90+
| name | address | state | health | hosting |
91+
+----------------------------------------------------------------------------------------------------------+
9392
| "f3bd1199-bc6f-4a38-b25c-5f7588df5182" | "server01:7687" | "Enabled" | "Available" | ["system", "neo4j"] |
9493
| "b331e481-c2ba-4b4e-82f3-bb51fe171483" | "server02:7687" | "Enabled" | "Available" | ["system"] |
9594
| "bd80e8fd-a51b-406a-9ed4-42daf4792aa6" | "server03:7687" | "Enabled" | "Available" | ["system"] |
9695
| "df3758b1-337f-4b8a-a9de-8e745ca96549" | "server04:7687" | "Free" | "Available" | ["system"] |
9796
| "9207bfd9-aa1b-40c2-b965-edcd3955a20e" | "server05:7687" | "Free" | "Available" | ["system"] |
98-
+-----------------------------------------------------------------------------------------------------------+
97+
+----------------------------------------------------------------------------------------------------------+
9998
----
100-
99+
+
101100
For more extensive information about each server, use the `SHOW SERVERS YIELD *` command:
102-
101+
+
103102
[source, cypher, role=noplay]
104103
----
105104
SHOW SERVERS YIELD *;
106105
----
107-
106+
+
108107
[queryresult]
109108
----
110109
+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
@@ -118,6 +117,30 @@ SHOW SERVERS YIELD *;
118117
+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
119118
----
120119

120+
. To support analytic queries on the secondary servers, you have to explicitly enable them by running:
121+
+
122+
[source, cypher, role=noplay]
123+
----
124+
ENABLE SERVER "df3758b1-337f-4b8a-a9de-8e745ca96549";
125+
ENABLE SERVER "9207bfd9-aa1b-40c2-b965-edcd3955a20e";
126+
----
127+
+
128+
To check the result, run `SHOW SERVERS`.
129+
The output should show:
130+
+
131+
[queryresult]
132+
----
133+
+----------------------------------------------------------------------------------------------------------+
134+
| name | address | state | health | hosting |
135+
+----------------------------------------------------------------------------------------------------------+
136+
| "f3bd1199-bc6f-4a38-b25c-5f7588df5182" | "server01:7687" | "Enabled" | "Available" | ["system", "neo4j"] |
137+
| "b331e481-c2ba-4b4e-82f3-bb51fe171483" | "server02:7687" | "Enabled" | "Available" | ["system"] |
138+
| "bd80e8fd-a51b-406a-9ed4-42daf4792aa6" | "server03:7687" | "Enabled" | "Available" | ["system"] |
139+
| "df3758b1-337f-4b8a-a9de-8e745ca96549" | "server04:7687" | "Enabled" | "Available" | ["system"] |
140+
| "9207bfd9-aa1b-40c2-b965-edcd3955a20e" | "server05:7687" | "Enabled" | "Available" | ["system"] |
141+
+----------------------------------------------------------------------------------------------------------+
142+
----
143+
121144
[[cluster-example-create-databases-on-cluster]]
122145
=== Create new databases in the cluster
123146

@@ -153,22 +176,22 @@ The following example shows how to set up a non-fault tolerant analytics cluster
153176

154177
=== Deploy the cluster
155178

156-
.Configure a cluster with three servers
157-
179+
. Configure a cluster with three servers
180+
+
158181
In this example, three servers named `server01.example.com`, `server02.example.com` and `server03.example.com` are configured.
159182
Neo4j Enterprise Edition is installed on all three servers.
160183
They are configured by preparing xref:configuration/file-locations.adoc[_neo4j.conf_] on each server.
161184
Note that `server01.example.com` is different from the others, and is the only server where write operations take place.
162185
The other servers are able to execute read queries, and if using GDS, to write results back to the writing server.
163-
186+
+
164187
Key points:
165-
188+
+
166189
* The writer server only has itself in the list of discovery.
167190
This means it does not seek out the other members when it starts, they have to discover it.
168191
This is required in order to have a cluster with only a single primary for the `system` database.
169-
* The servers for analytics have mode constraints configured that restrict their hosting mode to _secondary_ to prevent them from participating in normal write operations.
192+
* The servers for analytics have their mode constraints configured to `SECONDARY` to prevent them from participating in write operations.
170193
* In the example below, you set `dbms.cluster.discovery.resolver_type=LIST`.
171-
194+
+
172195
._neo4j.conf_ on server01.example.com - the writer:
173196
[source, properties]
174197
----
@@ -177,7 +200,7 @@ server.default_advertised_address=server01.example.com
177200
# Only has self in this list
178201
dbms.cluster.endpoints=server01.example.com:6000
179202
----
180-
203+
+
181204
._neo4j.conf_ on server02.example.com - an analytics server:
182205
[source, properties]
183206
----
@@ -187,7 +210,7 @@ dbms.cluster.endpoints=server01.example.com:6000,server02.example.com:6000,serve
187210
initial.server.mode_constraint=SECONDARY
188211
server.cluster.system_database_mode=SECONDARY
189212
----
190-
213+
+
191214
._neo4j.conf_ on server03.example.com - an analytics server:
192215
[source, properties]
193216
----
@@ -198,35 +221,35 @@ initial.server.mode_constraint=SECONDARY
198221
server.cluster.system_database_mode=SECONDARY
199222
----
200223

201-
The Neo4j servers are ready to be started.
224+
. The Neo4j servers are ready to be started.
202225
The startup order does not matter.
203226

204-
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.
227+
. 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.
205228
This shows information about each member of the cluster:
206-
229+
+
207230
[source, cypher, role=noplay]
208231
----
209232
SHOW SERVERS;
210233
----
211-
234+
+
212235
[queryresult]
213236
----
214-
+-----------------------------------------------------------------------------------------------------------+
215-
| name | address | state | health | hosting |
216-
+-----------------------------------------------------------------------------------------------------------+
237+
+----------------------------------------------------------------------------------------------------------+
238+
| name | address | state | health | hosting |
239+
+----------------------------------------------------------------------------------------------------------+
217240
| "d6fbe54b-0c6a-4959-9bcb-dcbbe80262a4" | "server01:7687" | "Enabled" | "Available" | ["system", "neo4j"] |
218241
| "e56b49ea-243f-11ed-861d-0242ac120002" | "server02:7687" | "Free" | "Available" | ["system"] |
219242
| "73e9a990-0a97-4a09-91e9-622bf0b239a4" | "server03:7687" | "Free" | "Available" | ["system"] |
220-
+-----------------------------------------------------------------------------------------------------------+
243+
+----------------------------------------------------------------------------------------------------------+
221244
----
222-
245+
+
223246
For more extensive information about each server, use the `SHOW SERVERS YIELD *` command:
224-
247+
+
225248
[source, cypher, role=noplay]
226249
----
227250
SHOW SERVERS YIELD *;
228251
----
229-
252+
+
230253
[queryresult]
231254
----
232255
+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
@@ -238,6 +261,29 @@ SHOW SERVERS YIELD *;
238261
+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
239262
----
240263

264+
. To support analytic queries on the secondary servers, you need to explicitly enable them by running:
265+
+
266+
[source, cypher, role=noplay]
267+
----
268+
ENABLE SERVER "e56b49ea-243f-11ed-861d-0242ac120002";
269+
ENABLE SERVER "73e9a990-0a97-4a09-91e9-622bf0b239a4";
270+
----
271+
+
272+
To check the result, run `SHOW SERVERS`.
273+
The output should show:
274+
+
275+
[queryresult]
276+
----
277+
+----------------------------------------------------------------------------------------------------------+
278+
| name | address | state | health | hosting |
279+
+----------------------------------------------------------------------------------------------------------+
280+
| "d6fbe54b-0c6a-4959-9bcb-dcbbe80262a4" | "server01:7687" | "Enabled" | "Available" | ["system", "neo4j"] |
281+
| "e56b49ea-243f-11ed-861d-0242ac120002" | "server02:7687" | "Enabled" | "Available" | ["system"] |
282+
| "73e9a990-0a97-4a09-91e9-622bf0b239a4" | "server03:7687" | "Enabled" | "Available" | ["system"] |
283+
+----------------------------------------------------------------------------------------------------------+
284+
----
285+
286+
241287

242288
[[cluster-example-create-databases-on-single-primary-cluster]]
243289
=== Create new databases in the cluster

0 commit comments

Comments
 (0)