Select Page

Reason #2 to Migrate to MongoDB Atlas: Easier Scalability

Author: Esayas Aloto | 4 min read | August 8, 2019

Scalability is a major concern for all modern businesses, which is why it’s our second reason to migrate to MongoDB. Your applications and systems must adapt to unexpected demands along with the normal growth rate of your organization. Due to MongoDB being a NoSQL database, it supports horizontal scalability through a process called sharding.

Sharding separates larger databases into smaller partitions to improve performance. MongoDB comes with three sharding methods built-in:

Ranged Sharding

Your data gets separated into contiguous ranges based on the shard key value. For example, if two documents have shard key values that are close to one another, they end up getting located in the same shard. You typically use ranged sharding for applications that perform many range queries. Due to this configuration, you don’t have equal distribution of the data stored on your servers.

Hashed Sharding

The data gets distributed uniformly across the shards. The location is determined by the hash of the shard key value, which means that two documents with close shard key values generally don’t end up in the same shard. You’re covering a range of data, rather than pulling an exact value.

Hashed sharding makes the most sense for applications that write frequently to the database. You can increase the shards to get better performance out of read/write operations, as these operations are evenly distributed throughout this grouping.

Zone Sharding

You choose a specified trait that controls the data distribution. Some common parameters include the geographic location of the data, hardware configuration, or other shard values or ranges. You can associate a zone with more than one shard as well.

This method works well if you need your data sharded in a particular way to support the operations of your application. A common use case is improving data locality when you have your databases spread throughout multiple data centers.

MongoDB allows you to cluster shards together to increase the availability of the data and to continually grow your storage space for your databases.

Why Use MongoDB Atlas for Sharding

MongoDB has these sharding methods built-in, so you might wonder what Atlas can bring to the table to make it even better. MongoDB Atlas includes support for automatic sharding when you’re scaling, which eliminates the need for downtime during this process.

The data automatically gets balanced across the shards as your database grows larger. This configuration bypasses the limitations of a single server. The service also promises zero downtime when you’re scaling your databases up to larger instances.

Implementing MongoDB Atlas

Automated sharding is an attractive feature, especially when your company requires a lot of horizontal scalability for its databases. Migrating your databases to Atlas may seem like a daunting task, or one that you lack the in-house resources to perform.

Consider working with a managed service provider like Datavail that specializes in MongoDB and Atlas. We guide you throughout the entire migration process, from determining whether migration is a viable option for your infrastructure to optimizing your systems for performance. Having specialists with hands-on experience with this process is essential, as you can’t unshard a collection once you shard it.

Read This Next

5 Reasons to Migrate to MongoDB Atlas

Learn about all five reasons to migrate to MongoDB Atlas by downloading our white paper.

How to Solve the Oracle Error ORA-12154: TNS:could not resolve the connect identifier specified

The “ORA-12154: TNS Oracle error message is very common for database administrators. Learn how to diagnose & resolve this common issue here today.

Vijay Muthu | February 4, 2021

PostgreSQL vs. Oracle: Let’s Compare

Discover some key differences between PostgreSQL vs Oracle that can help you make an informed decision when deciding on a database management system.

Vijay Muthu | March 30, 2021

Oracle RMAN Backup and Recovery with Restore Points

Oracle restore points are useful for benchmark testing. Find out how you can use Oracle’s Recovery Manager (RMAN) tool to create and use restore points.

Cindy Putnam | May 3, 2019

Subscribe to Our Blog

Never miss a post! Stay up to date with the latest database, application and analytics tips and news. Delivered in a handy bi-weekly update straight to your inbox. You can unsubscribe at any time.

Work with Us

Let’s have a conversation about what you need to succeed and how we can help get you there.


Work for Us

Where do you want to take your career? Explore exciting opportunities to join our team.