Up until now, we have covered MongoDB from an application developer's point of view. But when we are ready to deploy the application on the production server, we have to pay attention to a few things other than ensuring that the application works the way we want it to. For instance, we want the queries to be fast enough so that it does not slow the website down. We have to make sure the database is safe and secure as we do not want some malicious user getting control of the database. In this chapter, we are going to touch all of these topics. So this is going to be a little more theoretical than other chapters.
So, in this chapter we will learn:
How to improve query performance using indexes
How to use built-in tools for profiling and optimizing queries
How to add user authentication and improve the security of a MongoDB server
How to improve durability of data in MongoDB