# Node synchronization in a cluster

**URL:** <https://community.dynatrace.com/t/node-synchronization-in-a-cluster/9026>\
**Category:** Dynatrace Managed\
**Tags:** dynatrace-managed\
**Created:** [November 10, 2017, 6:35pm UTC](https://community.dynatrace.com/t/node-synchronization-in-a-cluster/9026 "2017-11-10T18:35:52Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![moffatrt](https://avatars.discourse-cdn.com/v4/letter/m/ecc23a/32.png) [@moffatrt](https://community.dynatrace.com/u/moffatrt)\
**Post date:** [November 10, 2017, 6:35pm UTC](https://community.dynatrace.com/t/node-synchronization-in-a-cluster/9026/1 "2017-11-10T18:35:52Z")

</div>

We have two Dynatrace Managed nodes in a cluster. However, they currently appear to be out of sync due to a node being down for a few days. Is there a way to force a resync and/or verify that sync is working?

---

<div class="post-metadata">

**Author:** ![Radoslaw\_Szulgo](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/radoslaw_szulgo/32/1977_2.png) [@Radoslaw\_Szulgo](https://community.dynatrace.com/u/Radoslaw_Szulgo)\
**Post date:** [November 10, 2017, 7:58pm UTC](https://community.dynatrace.com/t/node-synchronization-in-a-cluster/9026/2 "2017-11-10T19:58:48Z")

</div>

Sure. If you mean data synchronization in Cassandra, then you can check the status by executing

```auto
/opt/dynatrace-managed/utils/cassandra-nodetool.sh

```

More details:

[https://docs.datastax.com/en/cassandra/2.1/cassand…](https://docs.datastax.com/en/cassandra/2.1/cassandra/tools/toolsStatus.html)

---

<div class="post-metadata">

**Author:** ![kristof\_renders](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/kristof_renders/32/19857_2.png) [@kristof\_renders](https://community.dynatrace.com/u/kristof_renders)\
**Post date:** [November 13, 2017, 11:14am UTC](https://community.dynatrace.com/t/node-synchronization-in-a-cluster/9026/3 "2017-11-13T11:14:17Z")

</div>

Hi Radoslaw,

Thank you very much for this info!

Does this get detected and rectified automatically or should this be a manual action that gets started.

Cheers!

---

<div class="post-metadata">

**Author:** ![Radoslaw\_Szulgo](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/radoslaw_szulgo/32/1977_2.png) [@Radoslaw\_Szulgo](https://community.dynatrace.com/u/Radoslaw_Szulgo)\
**Post date:** [November 13, 2017, 12:24pm UTC](https://community.dynatrace.com/t/node-synchronization-in-a-cluster/9026/4 "2017-11-13T12:24:40Z")

</div>

What gets detected ? if data synchronization is in processes?

Cassandra nodes synchronize automatically, unless there is an issue e.g. connectivity.

---

<div class="post-metadata">

**Author:** ![kristof\_renders](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/kristof_renders/32/19857_2.png) [@kristof\_renders](https://community.dynatrace.com/u/kristof_renders)\
**Post date:** [November 13, 2017, 12:57pm UTC](https://community.dynatrace.com/t/node-synchronization-in-a-cluster/9026/5 "2017-11-13T12:57:15Z")

</div>

If nodes are out of sync. And does the cluster automatically recover?

---

<div class="post-metadata">

**Author:** ![moffatrt](https://avatars.discourse-cdn.com/v4/letter/m/ecc23a/32.png) [@moffatrt](https://community.dynatrace.com/u/moffatrt)\
**Post date:** [November 13, 2017, 1:59pm UTC](https://community.dynatrace.com/t/node-synchronization-in-a-cluster/9026/6 "2017-11-13T13:59:38Z")

</div>

I was wondering the same thing as the size of the nodes still do not match. One is at 31.96GB and the other is at 43.96GB. Should these numbers always match?

---

<div class="post-metadata">

**Author:** ![thomas\_steinma1](https://avatars.discourse-cdn.com/v4/letter/t/439d5e/32.png) [@thomas\_steinma1](https://community.dynatrace.com/u/thomas_steinma1)\
**Post date:** [November 13, 2017, 4:00pm UTC](https://community.dynatrace.com/t/node-synchronization-in-a-cluster/9026/7 "2017-11-13T16:00:48Z")

</div>

Cassandra has something called “hinted handoff”. With that, the Cassandra node serving a write request will temporarily store a missed write for a down node for a time-frame of 3 hours. If a node is down longer than 3 hours, it will get practically out-of-sync once it recovers (Cassandra process started up again) and needs a “repair” from a Cassandra low-level perspective.

This can be invoked by a Cassandra command-line tool called “nodetool” and proper options. The above mentioned shell script is just our “wrapper” script around nodetool. In this particular scenario: “a node recovers from down-time \> 3 hours still being part of the same cluster as before”, the correct nodetool execution on the **recovering node** is to invoke a full repair via:

```auto
/opt/dynatrace-managed/utils/cassandra-nodetool.sh repair

```

Best being executed in a dedicated Linux screen session, as this may take hours depending on the data volume.

Regarding size being reported as “Load” via nodetool. They don’t need to necessarily match. Details on that would be beyond this comment here. For an active repair, there is usually sign in the Cassandra log (cassandra.log) and/or even “nodetool compactionstats” is reporting compactions of type “Validate” on the recovering node.

---

<div class="post-metadata">

**Author:** ![moffatrt](https://avatars.discourse-cdn.com/v4/letter/m/ecc23a/32.png) [@moffatrt](https://community.dynatrace.com/u/moffatrt)\
**Post date:** [November 13, 2017, 6:59pm UTC](https://community.dynatrace.com/t/node-synchronization-in-a-cluster/9026/8 "2017-11-13T18:59:24Z")

</div>

In addition, if one of the nodes is offline longer than 7 days, the other nodes remove any reference to it and remove it from the cluster. If the other node is reactivated, it will never sync up with the cluster as it is now effectively orphaned. This is basically what happened to our node and why it never synced up. Thanks for the info, everyone!

---

<div class="post-metadata">

**Author:** ![kristof\_renders](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/kristof_renders/32/19857_2.png) [@kristof\_renders](https://community.dynatrace.com/u/kristof_renders)\
**Post date:** [November 14, 2017, 9:21am UTC](https://community.dynatrace.com/t/node-synchronization-in-a-cluster/9026/9 "2017-11-14T09:21:41Z")

</div>

Thanks, all, for your great and detailed answer. So if I can summarise:

- Nodes out of sync (as described by Thomas) are not automatically repaired and a manual command has to be initiated
- If your node is offline for too long (7d+) it will be orphaned and no longer part of the cluster. I guess best solution is to add a new node to the cluster? Would we still be able to access PP data from that node?
- Still an open question is if Dynatrace actively reports on nodes being out of sync? Will we see it in the CMC? Or even in the debug UI?

Again, thanks all for the great answers!

Cheers,  
Kristof
