The MongoD ๐Ÿค–

ยท

2 min read

Today, let's take a quick look ๐Ÿ‘€ at the daemon process for MongoDB - MongoD ๐Ÿฅ;
which handles all the queries that we execute in Mongo Shell ๐Ÿš and is also responsible for persisting data.

๐Ÿ’ก
Daemon process are background process that are not interacted with directly.

Take a look at the below diagram and try to understand it.

That's why, MongoD is present inside every mongo server, whether it is a replicaset or a sharded server.
We can start the mongoD process in a mongo server with the help of a command -mongod .

Below is the default configuration for MongoD -

๐Ÿ’ก
DBPath is the directory where all the data files for your database are stored. The dbpath also contains journaling logs to provide durability in case of a crash.
๐Ÿ’ก
Port option allows us to specify the port on which mongod will listen for client connections. mongod --port <port_number>
๐Ÿ’ก
auth enables authentication to control which users can access the database. When auth is specified, all database clients who want to connect to mongod first need to authenticate.
๐Ÿ’ก
bind_ip option allows us to specify which IP addresses mongod should bind to. When mongod binds to an IP address, clients from that address are able to connect to mongod. mongod --bind_ip localhost,123.123.123.123

Well, thanks for reading ๐Ÿ’š. I hope you got to learn something new. And if you are still figuring out what the hell journaling logs are ๐Ÿ˜‰ then stay tuned ๐Ÿ“–; let's see you in the next one ๐Ÿ‘‹๐Ÿป