Category: Data, Database

Index builds on MongoDB production clusters need to be handled with the utmost care. We have documented the issues in detail in one of our previous blog posts – The Perils of Building Indexes on MongoDB.

So, how do you prevent your users from accidentally triggering index builds from the MongoDB CLI?

For a primer on how to use MongoDB roles, please refer to the documentation – Manage Users and Roles. The best option to implement this is to create your own custom role and remove the ‘CreateIndex’ privilege for your users.

Related Articles