mLab Vs MongoDB Atlas Vs Manual Installation


MongoDB Atlas is a new MongoDB as a service offering by the company that makes the database. MLab is a well-known provider in this space from years.
Today I have tested the speeds of MongoDB from the raw installation in a t2.mico instance vs Mlab vs Atlas I also tested the speeds of MongoDB from a Heroku app to MLab & Atlas and following are the results.

collection sizequeryt2.micro NodeJS Server + t2.micro MongoDBt2.micro NodeJS Server + mLabt2.micro NodeJS Server + AtlasmLab + herokuAtlas + heroku
100k recordspage=1&size=201.582757.44
100k recordspage=10&size=201.583752.53
100k recordspage=100&size=202.585764.475
100k recordspage=500&size=208.51751671413
100k recordspage=1000&size=20151871692524
100k recordspage=2000&size=20271261174344
100k recordspage=3000&size=20401481376565
100k recordspage=5000&size=2065191178109102

| collection size | query |t2.micro NodeJS Server + t2.micro MongoDB|t2.micro NodeJS Server + mLab|t2.micro NodeJS Server + Atlas|mLab + heroku|Atlas + heroku|
|--------|--------|----|---|--|---|
|100k records|page=1&size=100|3.1|245|220|5|12
|100k records|page=10&size=100|3.9|248|220|6|15
|100k records|page=100&size=100|10|256|230|15|17
|100k records|page=500&size=100|35|305|271|58|61
|100k records|page=1000&size=100|67|356|320|111|114

One record query time

t2.micro NodeJS Server + mLab : 80ms

t2.micro NodeJS Server + Atlas : 75ms

t2.micro NodeJS Server + t2.micro MongoDB : 1 ms

mLab + heroku: 2

Atlas + heroku : 2.9

Note: The collection I have tested has two columns other than _id and each one has a length of 300 to 500 characters.