1

I am currently trying to determine the best way to implement across region replica set for Mongodb in AWS. My 3 replica set would be distributed over multiple regions, not just multiple availability zones. For example, the primary would be in east coast, and secondaries would be on west coast and canada.

My question is how to best handle the IP addressing for setting up such a distributed replica set across geographic regions in AWS. It works with public IP addresses across regions, but I want to secure with private IPs. Is it possible to use private IPs?

2 Answers2

0

Yes you can! Here it is explained. You have "public" IP for clients and then you have private IP addresses between DB servers.

JJussi
  • 1,540
  • 12
  • 12
0

I think what you may be looking for is AWS VPC Peering. This will allow you to use private IP addresses in your replica members and there is no public access to the entire replica set. The Mongo docs describe the process of replica distribution across regions here.

The scenario your describing will allow for quicker reads in the various regions, but for any write actions you still need to communicate with the primary.

pulpfree
  • 31
  • 4