Skip to content

Commit 0367556

Browse files
Rewrite the steps
1 parent fd0e71d commit 0367556

File tree

1 file changed

+20
-30
lines changed

1 file changed

+20
-30
lines changed

modules/ROOT/pages/cloud-deployments/neo4j-cluster-cloud.adoc

Lines changed: 20 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
:page-role: enterprise-edition
33

44
[[neo4j-cluster-cloud-deployments]]
5-
= Neo4j cluster on self-managed cloud deployments
5+
= Neo4j cluster in self-managed cloud deployments
66

77
Before diving into the topic, it is important to understand basics about Neo4j's clustering.
88

@@ -24,30 +24,19 @@ The Neo4j AWS Marketplace listings (and listings on GitHub) use CloudFormation t
2424
// === Neo4j cluster and auto-scaling groups on AWS
2525

2626

27-
=== Removing a (secondary constrained) server from the cluster
27+
=== Remove a server from the Neo4j cluster
2828

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.
3132

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:
3434

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.
3737

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.
5140

5241
.. Run the following query to check servers are hosting all their assigned databases.
5342
The query should return no results:
@@ -72,18 +61,19 @@ SHOW DATABASES YIELD name, address, currentStatus, requestedStatus, statusMessag
7261
sudo systemctl stop neo4j
7362
----
7463
+
75-
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.
7966
+
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.
8272

8373
.. Verify that the shutdown process has finished successfully by checking the _neo4j.log_ for relevant log messages confirming the shutdown.
8474

8575

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.
8777
.. Run `systemctl start neo4j`.
8878
.. Once the server has been restarted, confirm it is running successfully.
8979
+
@@ -103,7 +93,7 @@ This command shows any databases that are not in their expected state:
10393
SHOW DATABASES YIELD name, address, currentStatus, requestedStatus, serverID WHERE currentStatus <> requestedStatus AND serverID = [server-id] RETURN name, address, currentStatus, requestedStatus
10494
----
10595

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.
10898

10999

0 commit comments

Comments
 (0)