Serverless vs Shared/Dedicated?


We’re currently deciding which option to go for on MongoDB Atlas, Serverless vs having a cluster (Shared/Dedicated).

We’re a bit confused about how Serverless operates, in the docs it states:

Serverless instances are incredibly flexible and are recommend for lightweight or infrequent application workloads

However it also states:

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.

Which is a little bit confusing, does this mean Serverless can handle heavy loads when it needs? Or is it not recommended for heavy loads completely?

We’re building a fitness tracking application with daily goals where users login every day to check their progress, badges, etc…

We also want to ensure the application would work well under heavier load if we experience a spike in traffic (promo code events, etc…)

Comparing the storage capacity for example Shared Free (512MB) vs Serverless (up to 1TB per 1M reads, which is a huge number in our case), is this a fair comparison?

Thanks in advance!

1 Like


I think this might answer your question:

Regards !

Welcome to the MongoDB Community @Turbulent_Stability !

The Atlas Serverless FAQ shared by @Xeneural_INC is a good reference.

Serverless will automatically scale to larger workloads. A dedicated Atlas instance (M10+) can also be configured for auto-scaling, but is less reactive to bursty workloads. For example, per the note on the auto-scaling page:

Scaling up to a greater cluster tier requires enough time to prepare backing resources. Automatic scaling may not occur when a cluster receives a burst of activity, such as a bulk insert. To reduce the risk of running out of resources, plan to scale up clusters before bulk inserts and other workload spikes.

A main difference in the billing model is that a traditional Atlas cluster is based on a reserved allocation of resources (RAM, CPU, Disk) whereas a Serverless cluster is billed based on usage (resources scale to match workload).

If you have a consistent level of workload with occasional spikes for promotions (which you can proactively plan for), a dedicated cluster may be more cost effective. If your workload is less predictable, a serverless cluster may be more suitable.

You can perhaps get some more relevant advice discussing your current and future workload with the MongoDB Sales team and a Solution Architect: Contact Us | MongoDB.

The shared tier has options for 2 or 5 GB of storage (or 512MB for the free plan), and generally isn’t sized for typical production workloads.

If you are expecting more significant growth and scaling, the Dedicated Tier would be a better comparison point (10GB to 4TB of storage, 2GB to 768 GB of RAM) with additional features such as auto-scaling, VPC peering, and more storage options (eg NVMe).