You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: modules/ROOT/pages/cloud-deployments/neo4j-cluster-cloud.adoc
+20-30Lines changed: 20 additions & 30 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,7 +2,7 @@
2
2
:page-role: enterprise-edition
3
3
4
4
[[neo4j-cluster-cloud-deployments]]
5
-
= Neo4j cluster on self-managed cloud deployments
5
+
= Neo4j cluster in self-managed cloud deployments
6
6
7
7
Before diving into the topic, it is important to understand basics about Neo4j's clustering.
8
8
@@ -24,30 +24,19 @@ The Neo4j AWS Marketplace listings (and listings on GitHub) use CloudFormation t
24
24
// === Neo4j cluster and auto-scaling groups on AWS
25
25
26
26
27
-
=== Removing a (secondary constrained) server from the cluster
27
+
=== Remove a server from the Neo4j cluster
28
28
29
-
Imagine you have a cluster consisting of three primary constrained servers and two secondary constrained servers.
30
-
This means that three servers host primary databases and the other two host secondary databases.
29
+
Rolling updates on Amazon Machine Images (AMIs) often involve their rotating.
30
+
However, simply removing Neo4j servers from the target Network Load Balancer (NLB) one by one does not prevent requests from being routed to them.
31
+
This occurs because the NLB and Neo4j server-side routing operate independently and do not share awareness of a server availability.
31
32
32
-
When performing rolling updates on Amazon Machine Images (AMIs) for secondary servers, it is important to follow a structured approach.
33
-
Rotating AMIs is a common practice in such environments.
33
+
To correctly remove a server from the cluster and reintroduce it after the update, follow the steps outlined below:
34
34
35
-
However, simply removing secondary servers from the target Network Load Balancer (NLB) one by one does not prevent read requests from being routed to them.
36
-
This occurs because the NLB and Neo4j server-side routing operate independently and do not share awareness of server availability.
35
+
. Remove the server from the AWS NLB.
36
+
This prevents external clients from sending requests to the server.
37
37
38
-
To correctly remove a secondary server from the cluster and reintroduce it after the update:
39
-
40
-
. Remove the server from the NLB to stop traffic routing.
41
-
. Shut down the server before proceeding with the AMI update.
42
-
43
-
44
-
Here are the steps:
45
-
46
-
. Remove the secondary from the AWS NLB.
47
-
This prevents external clients from sending requests to the secondary.
48
-
49
-
. Since Neo4j's cluster routing (server-side routing) does not use the NLB, you need to ensure that queries are not routed to the secondary server.
50
-
To do this, you have to cleanly shut down the secondary.
38
+
. Since Neo4j's cluster routing (server-side routing) does not use the NLB, you need to ensure that queries are not routed to the server.
39
+
To do this, you have to cleanly shut down the server.
51
40
52
41
.. Run the following query to check servers are hosting all their assigned databases.
To configure the timeout period for waiting on active transactions to either complete or be terminated during shutdown, you can modify the environment variable `NEO4J_SHUTDOWN_TIMEOUT` using `systemctl edit neo4j.service`
76
-
or the setting xref::configuration/configuration-settings.adoc#config_db.shutdown_transaction_end_timeout[`db.shutdown_transaction_end_timeout`] in _neo4j.conf_ file.
77
-
+
78
-
By default, `NEO4J_SHUTDOWN_TIMEOUT` is set to 120 seconds and `db.shutdown_transaction_end_timeout` -- to 10 seconds.
64
+
To configure the timeout period for waiting on active transactions to either complete or be terminated before the shutdown, modify the setting xref::configuration/configuration-settings.adoc#config_db.shutdown_transaction_end_timeout[`db.shutdown_transaction_end_timeout`] in the _neo4j.conf_ file.
65
+
`db.shutdown_transaction_end_timeout` defaults to 10 seconds.
79
66
+
80
-
If the shutdown process exceeds these limits, it is considered failed.
81
-
You may need to increase the values if the system serves long-running transactions.
67
+
The environment variable `NEO4J_SHUTDOWN_TIMEOUT` determines how long the system will wait for Neo4j to stop before forcefully terminating the process.
68
+
You can change this using `systemctl edit neo4j.service`.
69
+
By default, `NEO4J_SHUTDOWN_TIMEOUT` is set to 120 seconds.
70
+
If the shutdown process exceeds this limit, it is considered failed.
71
+
You may need to increase the value if the system serves long-running transactions.
82
72
83
73
.. Verify that the shutdown process has finished successfully by checking the _neo4j.log_ for relevant log messages confirming the shutdown.
84
74
85
75
86
-
. When everything is updated or fixed, start the secondaries one by one again.
76
+
. When everything is updated or fixed, start the servers one by one again.
87
77
.. Run `systemctl start neo4j`.
88
78
.. Once the server has been restarted, confirm it is running successfully.
89
79
+
@@ -103,7 +93,7 @@ This command shows any databases that are not in their expected state:
103
93
SHOW DATABASES YIELD name, address, currentStatus, requestedStatus, serverID WHERE currentStatus <> requestedStatus AND serverID = [server-id] RETURN name, address, currentStatus, requestedStatus
104
94
----
105
95
106
-
. Reattach the secondary to the NLB.
107
-
Once the secondary server is stable and caught up, add it back to the AWS NLB target group.
96
+
. Reattach the server to the NLB.
97
+
Once the server is stable and caught up, add it back to the AWS NLB target group.
0 commit comments