JoeTidee
JoeTidee

Reputation: 26044

Should i use the Mongo DB that comes with meteor?

When creating a Meteor app., Mongo is installed by default and runs automatically when I run my app. In the past, with other non-Meteor apps, I have always tried to place my app code files and database on separate servers to ensure that I can scale them independently. It feels as though this default Mongo install is a convenient way simply for Meteor to use a database out-of-the box, just to get you going. Thinking ahead, I want my app to scale, so should I start thinking about using a Mongo instance on separate server and, if so, what process do I go through to detach this default Mongo instance from my Meteor app?

Upvotes: 1

Views: 115

Answers (1)

David Weldon
David Weldon

Reputation: 64312

The instance of mongodb that comes with meteor is only for use when developing your app. In a production environment, you should either install your own mongo instance or use a service.

I strongly recommend using compose.io in production. We've had a really good experience with them and the most basic deployment comes with access to the oplog which is critical for scaling your app.

Either way, in production you will provide two URLs to your app via environment variables:

  • MONGO_URL
  • MONGO_OPLOG_URL (this is optional but strongly recommended)

If you go with compose, here is the guide for integrating with meteor.

Upvotes: 1

Related Questions