# Syncing the mongodb operator between two datacenters

**URL:** <https://forums.percona.com/t/syncing-the-mongodb-operator-between-two-datacenters/27756>\
**Category:** MongoDB\
**Created:** [January 13, 2024, 10:53am UTC](https://forums.percona.com/t/syncing-the-mongodb-operator-between-two-datacenters/27756 "2024-01-13T10:53:12Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![zozotk](https://avatars.discourse-cdn.com/v4/letter/z/ea666f/32.png) [@zozotk](https://forums.percona.com/u/zozotk)\
**Post date:** [January 13, 2024, 10:53am UTC](https://forums.percona.com/t/syncing-the-mongodb-operator-between-two-datacenters/27756/1 "2024-01-13T10:53:12Z")

</div>

Hello,

I am using mongodb operator and I was thinking it would be awesome if somehow I could connect the new mongodb that I am going to install to the existing mongodb installation that is running on another datacenter so that the two installations would have the exact same data and would replicate to eachother.

Is this possible and what are my choices?

---

<div class="post-metadata">

**Author:** ![Sergey\_Pronin](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/sergey_pronin/32/14887_2.png) [@Sergey\_Pronin](https://forums.percona.com/u/Sergey_Pronin)\
**Post date:** [January 14, 2024, 8:38pm UTC](https://forums.percona.com/t/syncing-the-mongodb-operator-between-two-datacenters/27756/2 "2024-01-14T20:38:47Z")

</div>

Hello @zozotk ,

In our operator for Mongodb we provide the ability to add external nodes to your existing replica set. Also called cross site replication or multi cluster.

You can read more about it here: [About Multi-cluster - Percona Operator for MongoDB](https://docs.percona.com/percona-operator-for-mongodb/replication.html)

Is it what you are looking for?

---

<div class="post-metadata">

**Author:** ![zozotk](https://avatars.discourse-cdn.com/v4/letter/z/ea666f/32.png) [@zozotk](https://forums.percona.com/u/zozotk)\
**Post date:** [January 15, 2024, 9:03am UTC](https://forums.percona.com/t/syncing-the-mongodb-operator-between-two-datacenters/27756/3 "2024-01-15T09:03:14Z")

</div>

Looks good. The question is since we expose the cluster and not the nodes via the LoadBalancer service how will I tell the other cluster the nodes from the other cluster?

Regards,

---

<div class="post-metadata">

**Author:** ![Sergey\_Pronin](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/sergey_pronin/32/14887_2.png) [@Sergey\_Pronin](https://forums.percona.com/u/Sergey_Pronin)\
**Post date:** [January 15, 2024, 10:12am UTC](https://forums.percona.com/t/syncing-the-mongodb-operator-between-two-datacenters/27756/4 "2024-01-15T10:12:34Z")

</div>

All your nodes need to connect to each other, so you will have to expose your nodes somehow or provide other means of connectivity between them (like multi-cluster or some service mesh). Unfortunatelly it is just how MongoDB works.
