# Nodes in different clusters on the same subnet with mesh configuration form ONE cluster

**URL:** <https://discuss.aerospike.com/t/nodes-in-different-clusters-on-the-same-subnet-with-mesh-configuration-form-one-cluster/9551>\
**Category:** General Discussion\
**Created:** [June 30, 2022, 5:52pm UTC](https://discuss.aerospike.com/t/nodes-in-different-clusters-on-the-same-subnet-with-mesh-configuration-form-one-cluster/9551 "2022-06-30T17:52:18Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![jrodriguez](https://avatars.discourse-cdn.com/v4/letter/j/35a633/32.png) [@jrodriguez](https://discuss.aerospike.com/u/jrodriguez)\
**Post date:** [June 30, 2022, 5:52pm UTC](https://discuss.aerospike.com/t/nodes-in-different-clusters-on-the-same-subnet-with-mesh-configuration-form-one-cluster/9551/1 "2022-06-30T17:52:18Z")

</div>

I am currently seeing an issue where I have two aerospike clusters running CE v3.16 with the following network configurations:

```auto
# cluster 1
network {
    service {
        address any
        port 3000
    }

    heartbeat {
        mode mesh
        address 10.34.152.53
        port 3002
        mesh-seed-address-port 10.34.151.50 3002
        mesh-seed-address-port 10.34.151.51 3002
        mesh-seed-address-port 10.34.152.53 3002

# cluster 2
network {
    service {
        address any
        port 3000
    }

    heartbeat {
        mode mesh
        address 10.34.151.52
        port 3002
        mesh-seed-address-port 10.34.151.48 3002
        mesh-seed-address-port 10.34.151.49 3002
        mesh-seed-address-port 10.34.151.52 3002

```

The expectation here is that because the nodes are in mesh configuration for each cluster then they should form two separate clusters; however, the nodes end up forming ONE single cluster. Is there anything that prevents two clusters in the same subnet from operating independently?

For context the namespaces in each cluster (names are examples only for illustration purposes):

```auto
Cluster 1:

a-namespace
b-namespace
c-namespace

```

```auto
Cluster 2:

c-namespace

```

The reason why both clusters have the “c-namespace” is because that namespace will eventually be migrated to Cluster 2 and deleted from Cluster 1. But because it is currently being used in production, we cannot perform that migration. We had actually set up Cluster 2 in preparation for this migration and noticed this behavior.

Is there something at the namespace level that knows that the namespace exists in both clusters and this is the reason why both clusters form a single cluster?

Through asadm I validated that Cluster 2 does not have a-namespace and b-namespace, only c-namespace as that’s what is it in its namespace configuration.

Additionally, we have clusters in our qa environment with the same exact configurations and they form two independent clusters. The only difference is that the clusters are in different subnets.

Appreciate any response in advance, thank you.

---

<div class="post-metadata">

**Author:** ![pgupta](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.aerospike.com/pgupta/32/2351_2.png) [@pgupta](https://discuss.aerospike.com/u/pgupta)\
**Post date:** [June 30, 2022, 7:15pm UTC](https://discuss.aerospike.com/t/nodes-in-different-clusters-on-the-same-subnet-with-mesh-configuration-form-one-cluster/9551/2 "2022-06-30T19:15:20Z")

</div>

Theoretically, they should run as separate clusters unless you at some point you had one of the nodes of the second cluster part of the first cluster and it has those ip-addresses in its cache. You might want to use a different heartbeat port (say 4002) on the second cluster. Also see tip-clear command to clear the cache [Info Command Reference | Aerospike Documentation](https://docs.aerospike.com/reference/info#tip-clear)

---

<div class="post-metadata">

**Author:** ![jrodriguez](https://avatars.discourse-cdn.com/v4/letter/j/35a633/32.png) [@jrodriguez](https://discuss.aerospike.com/u/jrodriguez)\
**Post date:** [June 30, 2022, 11:46pm UTC](https://discuss.aerospike.com/t/nodes-in-different-clusters-on-the-same-subnet-with-mesh-configuration-form-one-cluster/9551/3 "2022-06-30T23:46:19Z")

</div>

Thanks @pgupta not sure how I got into this situation but I ultimately ended up re-starting the aerospike service for the nodes in Cluster 2, watch them join Cluster 1, issue the tip-clear command (from a node in Cluster 1), stopped the aerospike service for the nodes in Cluster 2, and re-provisioned them. When they came back from re-provisioning, they correctly formed a 3 node cluster.

---

<div class="post-metadata">

**Author:** ![pgupta](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.aerospike.com/pgupta/32/2351_2.png) [@pgupta](https://discuss.aerospike.com/u/pgupta)\
**Post date:** [July 5, 2022, 5:35pm UTC](https://discuss.aerospike.com/t/nodes-in-different-clusters-on-the-same-subnet-with-mesh-configuration-form-one-cluster/9551/4 "2022-07-05T17:35:50Z")

</div>

Also, use “_cluster-name_” [config item](https://docs.aerospike.com/reference/configuration#cluster-name) to isolate clusters. Nodes will only join if specified cluster-name on node matches the _cluster-name_ on the target cluster.

---

<div class="post-metadata">

**Author:** ![system](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.aerospike.com/system/32/2274_2.png) [@system](https://discuss.aerospike.com/u/system)\
**Post date:** [September 27, 2022, 5:36pm UTC](https://discuss.aerospike.com/t/nodes-in-different-clusters-on-the-same-subnet-with-mesh-configuration-form-one-cluster/9551/5 "2022-09-27T17:36:07Z")

</div>

This topic was automatically closed 84 days after the last reply. New replies are no longer allowed.
