Is it possible to restrict the impact of a single user can have in a database

Hi all,

Is it possible to limit the impact a single user can have on a MongoDB replica set?

For example, if I have a large collection with millions of entries and a MongoDB client decides to perform a database query or aggregation that does not use an adequate index, this could result in a large COLLSCAN. Such an operation would typically consume all available MongoDB resources, creating a bottleneck for the replica set and causing other clients to experience timeouts.

My question is:
Can I enforce limits to prevent certain users from monopolizing resources? For instance, can I configure MongoDB user so that user “xpto” can only utilize up to 50% of the resources? If this limit is reached, their requests would be queued, ensuring that other clients sharing the same cluster can continue to perform well.

regards

1 Like