Amazon recently announced the public availability of its EU central (Frankfurt) region. With this new data center, AWS now has two data centers in the EU region – Ireland and Frankfurt. The availability of these two datacenters now allows you to improve the georedundancy of your MongoDB replicas.
Here are the steps to set up a geo-redundant MongoDB cluster on AWS in the EU region.
1. MongoDB Cluster Details
Enter the cluster details – name, version & size to get started:
2. Select the Region for Each Replica Set
We place the primary in EU-West (Ireland) and the secondary in EU-Central (Frankfurt). For 100% georedundancy, you need to place the arbiter in a different region. If you place the arbiter in only one of the EU regions, and that region goes down, your MongoDB cluster will not have a quorum and will hence degrade to read-only mode. The arbiter is a voting node and does not hold any data. So, irrespective of where you place the arbiter, all the production data and backups are stored in the EU region.
3. SSL Encryption
Because your replicas are located in different regions, the traffic between the replicas goes over the internet, so it’s important to encrypt your connections with SSL. For more information on how to connect to an SSL enabled cluster, refer to our earlier blog post – Securing your MongoDB clusters with SSL.
Once the cluster is deployed, you can validate that the replicas are placed in different regions. If you choose to put two replicas in the same region, they are distributed across two different availability zones for better availability.
For a more general discussion of geodistribution, please refer to our earlier post – Geo distributed MongoDB clusters for 100% availability.