Scale up as you grow — whether you're running one virtual machine or ten thousand.

From GPU-powered inference and Kubernetes to managed databases and storage, get everything you need to build, scale, and deploy intelligent applications.

This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
There is a big bug in this documentation. The hosts file, yes is mostly the same on all, but not entirely. If someone want’s to try this and has no idea what the hosts file does and what the differences should be he will never get this to work properly.
You should at least mention what part of the hosts file on each host should be different (the 127.0.0.1 line).
In hosts file, if private networking is enabled, Is it ok to save something like this
10.xxx.xxx.xxx mongo0.example.com
-or-
10.xxx.xxx.xxx mongo0 (since its arbitary)
@karthik: I think that should work fine. Try it out and let me know how it goes!
After installing MongoDB on Ubuntu VPS, the command
sudo service mongodb start
doesnt work. But the command
sudo service mongod start
works fine. So I guess correction is needed in the article.
This was tremendously helpful, thanks! One small note; if you’re setting up your nodes members to communicate across a private network, you may need to alter or remove the “bind_ip 127.0.0.1” line in your /etc/mongod.conf file before they will communicate.
Mine were reporting “exception: need most members up to reconfigure, not ok” prior to doing this and restarting the servers.
Thanks again for the great guide.
replSet = rs0 is this to identify each individual data set? So it should be the same on each host? Thank you for providing awesome documentation
Nice article, Can we add multiple instance on ec2,i want to run mongod on port 27017 and port 27019? if yes then how can we start both mongo instance?
To answer @seattledba 's question: This param should be the same for every host. replSet = rs0 for every host.
Thanks for this great tutorial. #HeartedAlready I had some issues during my setup which i think should be mentioned here.
The new conf file is located at /etc/mongod.conf and is in YAML format so you have to make some syntax changes as:-
dbpath: mongo-metadata
//remove comment before “replication” and then under it add replSetName: rs0
//remove comment before "processManagement and then under it add fork: true
Note the spaces in YAML