Like all user-friendly applications, MongoDB is extremely easy to set up and run out of the box. The default settings provided by MongoDB may not be optimal for all workloads and this can prove expensive post deployment. Hence, it becomes extremely important to consider the nuances that are involved in setting up a robust MongoDB infrastructure from the get-go.
The aim of this chapter is to highlight the key points that one must consider when deploying and running MongoDB systems in a production environment. We will look at the aspects of configuring MongoDB, operating system settings, and selecting upgrade strategies. Furthermore, we will look at how to encrypt server-to-server communication using TLS certificates. We will also learn how to ensure that selective firewall rules are implemented to restrict access to MongoDB.