Frequently Asked Questions - Atlas Serverless Instances

General Questions

What is a serverless database?

The idea of serverless computing has recently been extended to databases. Serverless databases share many of the same characteristics of serverless application platforms:

  • Elastic scaling: The ability to automatically scale up and down based on workload, including the ability to scale down to zero compute resources when there is no workload. Unlike serverless application platforms, which only manage compute, serverless database platforms have both a compute layer and a storage layer, both of which can scale elastically.
  • Consumption-based pricing: A pricing model that only charges for the data stored in the database and the resources used to service the database workload.

These attributes confer advantages similar to the serverless application model:

  1. You don’t need to think about scaling up to meet increasing workloads or storage needs.
  2. You don’t need to worry about paying for resources you are not using.

What is a serverless instance in MongoDB Atlas?

Serverless instances are a new database deployment on Atlas, offered in addition to our shared and dedicated clusters. With serverless instances, Atlas provides the resources you need to build a great application on-demand removing the need to manually scale up or down and only charges for the compute and storage resources you use.

Serverless instances run on the latest MongoDB version with automated upgrades and provide you with up to 1TB of storage, daily backups, performance optimization suggestions, and end-to-end encryption.

What is the difference between serverless instances and shared or dedicated clusters?

Serverless instances and clusters are two different types of database deployments available on MongoDB Atlas. The main differences include:

Serverless Instances Clusters
Configuration & Resource Planning Serverless instances require minimal configuration - you only need to choose a cloud provider/region to create a serverless instance. Dedicated and shared clusters require you to determine a cluster tier depending on the level of storage and CPU you require along with offering a variety of further configuration options.
Scaling With serverless instances, MongoDB Atlas will seamlessly provide the database resources your application needs at any given time, removing the need to manually scale up and down. With dedicated and shared clusters, you are required to select a cluster tier based on your resource needs at deployment. Cluster resources can be monitored and manually scaled up or down or you can enable auto-scaling for dedicated clusters with pre-set maximum and minimum thresholds. Note: auto-scaling is not instantaneous.
Costs Serverless instances are billed on usage: reads, writes, storage, backup and data transfer. You only pay for the resources you use. Clusters are billed hourly with monthly invoicing based on the predetermined storage, CPU and RAM of your chosen cluster tier. You pay a set price regardless of actual operations usage.

When should I use a serverless instance?

You can use serverless instances in production scenarios where the load is periodic and spiky or on test and integration infrastructure where you’re not running your application all the time. Check out this post for more details on what to consider when evaluating serverless for your needs.

It is important to note that serverless instances do have limitations in comparison to Atlas dedicated clusters. We recommend reviewing the limitations to ensure that your requirements can be met.

Serverless Pricing

What is the pricing for serverless instances?

Serverless instances are billed based on consumption of read processing units (RPUs), write processing units (WPUs), storage, backup and data transfer. In regards to read operations to the database, RPUs are calculated based on the number of read operations and the number of documents and indexes scanned per operation. For write operations, WPUs are calculated based on documents and indexes written (in 1KB chunks). Both RPUs and WPUs are calculated on a daily basis.

Serverless instances may be more cost effective for applications with low or intermittent traffic.
View pricing docs for more details →

How can I monitor my serverless usage?

You can view the metrics like RPU and WPUs for your Atlas serverless instance by navigating to your serverless instance and selecting ‘View Monitoring’ from within the Atlas UI. To keep tabs on your usage, you can also configure alerts for RPUs and WPUs to be notified if they exceed a certain threshold, or billing alerts to be notified if your daily bill exceeds a certain amount.

If you’re unsure what may be within the normal patterns of your application, you can always adjust these thresholds at any time in your project alert settings.

My bill is higher than expected. Is there anything I can do to reduce costs?

Since serverless instances are billed based on usage, it’s important to make sure you are following MongoDB best practices and indexing your data to minimize the number of reads being conducted by the database. For tips on how to keep your costs down, check out this article.

It is also important to note that constant or steady-state workloads may be more expensive if run on serverless. If your daily database activity is fairly constant, you may want to consider switching to an Atlas dedicated cluster.

Troubleshooting Issues

Why can’t I connect to my serverless instance via drivers?

Since serverless instances run on the latest version of MongoDB, they require up-to-date drivers. Your current driver may require an update in order to connect to your serverless instance. For a list of supported drivers for serverless instances, see Minimum Driver Versions for Serverless Instances.

How do I migrate my data from an existing cluster to a serverless instance?

If you are running a shared cluster (M0/M2/M5) you can easily migrate to a serverless instance simply by editing your cluster configuration in the Atlas UI and converting to serverless as your new deployment type.

To migrate data from an existing dedicated cluster (M10+) to your serverless instance you can:

You can also leverage the options above to move your data from a serverless instance to a shared or dedicated cluster as well if needed. View documentation for more details →

Why can’t I enable Atlas Search in my serverless instance?

Serverless instances currently do not offer full feature parity with Atlas dedicated clusters. For the most up-to-date information on what is supported with Atlas serverless instances, see Serverless Instance Limitations and Considerations.

Share your feedback with us

If you have any suggestions on how to improve serverless instances we’d love to hear from you. Please share your feedback with us via the MongoDB Feedback Engine or start a serverless discussion in the community forums.

10 Likes