2

I need a database for backends (for iOS apps). Those are mostly low-load demand applications and I like mongo for it's schemaless-ness. I'm looking to host both db and app server on a small digital-ocean instances.

I plan to:

  • run it under systemctl on debian probably
  • have periodic backups (not sure yet how)
  • make sure it's only accessible to localhost

Anything else I need to do, like maybe enable journaling? (if yes, how do I do it?). What else do I need to do so that my single-server mongod production deployment is decent?

1 Answer 1

3

I understand you want to deploy single instance of MongoDB for production. This is the the recommendation from MongoDB.

Use standalone instances for testing and development. Do not use these deployments, which lack replication and high availability, for production systems. For all production deployments use replica sets.

Details about installing MongoDB community edition here.

Details about backup here.

To enable journaling, start mongod with the --journal command line option. For 64-bit builds of mongod, journaling is enabled by default.

Details about journaling here and here.

4
  • Thank you for your answer and links. I know their recommendation but I don't need high-availability and replication, I want small single-server deployment. Like one can do with mysql and add replicas later when needed.
    – Dannie P
    Commented May 17, 2017 at 11:31
  • I did get that from your question but still wanted to mention. You should be able to set up single-server following those links. Commented May 17, 2017 at 12:18
  • Thank you. I've read the docs and still don't get it: should I enable journaling for single-server deployment? If I should, how do I do that? I know how to enable it in write operation via j:true, but can't see how to enable journaling for entire db. Anything else I need to do so that my deployment is fine?
    – Dannie P
    Commented May 17, 2017 at 13:36
  • Edited my answer. Looks good to me. Make sure backup is copied to different location in case you loose your storage (if that is important in your case). Commented May 17, 2017 at 13:41

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.