Our automated database service, MongoDB Atlas, now serves thousands of customers across a wide range of industries, providing high availability, consistent performance, and simplified operations.
Sega’s Hardlight Studio migrated to Atlas to support real-time data processing requirements in the cloud and improve the user experience for millions of mobile gamers.
MongoDB Atlas ensures high availability with a fault-tolerant and self-healing architecture. Replica set members are distributed across availability zones in a customer’s selected region; should a node fail, the election and failover process happen automatically without intervention. You can also choose from 41 regions across AWS, Azure, GCP, ensuring that your managed databases are in close proximity to your application servers for minimal geographic latency. While these deployment configurations serve a large portion of application requirements, customers have asked for more options and flexibility.
Today we are introducing cross-region replication for MongoDB Atlas. Within a single cloud, you can enable cross-region deployments for even better availability guarantees and improved performance for local reads.
Here’s how it works. When creating or modifying your deployment, you’ll now see a “Enable cross-region configurations options” link, shown below:
Selecting this link will present two non-exclusive options:
- You can deploy across multiple regions for better availability guarantees, meaning that replica set members in additional regions will participate in the election and automated failover process should your primary fail. Note that you can also select your preferred region; this is the region where reads and writes will default to assuming that there are no active failure or failover conditions.
- You can also deploy read-only replica set members. Read-only replica set members allow you to optimize for local reads (reduce read latency) across different geographic regions using a single MongoDB deployment. As the name suggests, these replica set members will not participate in the election and failover process and can never be elected to a primary replica set member.
Let’s look at a few examples. We’ll assume that your preferred region is us-east-1 in AWS, but not only do you want to withstand a partial region outage (an availability zone goes offline), you also want to withstand an outage of an entire AWS region. Your configuration might look something like what’s shown in the image below, where we’ve distributed our 3-node replica set across 3 regions in AWS. You might also increase the number of nodes in your replica set to 5 and keep 2 in us-east-1, your preferred region, 2 in us-east-2, and 1 in us-west-1. This would increase the likelihood that your primary node stays in your preferred region during a partial region outage. Note that Atlas will tell us the availability guarantees offered by our configuration, highlighted in the green lettering.
In the next example, let’s assume that you’re satisfied with the availability guarantees of having your cluster in the us-east-1 region, but you have a significant user base in the UK and want to provide them with an optimal user experience. You might set up a configuration like what’s shown below, deploying a read-only replica set member in London to serve local reads.
In the configuration shown below, we’ve enabled both options — our cluster is distributed across 3 regions in the US to ensure availability in the unlikely event of an entire regional outage AND we have a read-only replica set member for our user base in London.
Cross-region replication is now available on AWS, Azure and GCP. In addition, you can now have clusters in different regions within the same Project and easily move your deployments between regions while preserving availability.
Managed clusters at the right size (and price) for every project
We’re introducing new M2 and M5 instance sizes, available in select regions across all 3 clouds.
Built on a multi-tenant architecture, these new instance sizes allow you to jumpstart your project or scale beyond the M0 free tier, all for a low, predictable price.
As your storage, performance, or isolation requirements change, you can easily move beyond the initial boundaries and scale up to one of our dedicated cluster sizes.
Cross-region replication is now live in MongoDB Atlas. M2s and M5s are in public beta.
As always, we’d love to hear your feedback at firstname.lastname@example.org.
Not an Atlas user yet? Get started with a 512MB database for free.