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 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=20 | 1.5 | 82 | 75 | 7.4 | 4 |
100k records | page=10&size=20 | 1.5 | 83 | 75 | 2.5 | 3 |
100k records | page=100&size=20 | 2.5 | 85 | 76 | 4.47 | 5 |
100k records | page=500&size=20 | 8.5 | 175 | 167 | 14 | 13 |
100k records | page=1000&size=20 | 15 | 187 | 169 | 25 | 24 |
100k records | page=2000&size=20 | 27 | 126 | 117 | 43 | 44 |
100k records | page=3000&size=20 | 40 | 148 | 137 | 65 | 65 |
100k records | page=5000&size=20 | 65 | 191 | 178 | 109 | 102 |
| 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.