What is the purpose of 'write concern' in MongoDB?
To specify the level of security for write operations.
To limit the number of writes per second.
To control how many nodes must acknowledge a write operation.
To manage data compression for write operations.
Which of the following is a key advantage of using a sharded cluster in MongoDB?
Reduced memory consumption compared to a standalone deployment
Simplified data modeling and schema design
Improved write performance by distributing writes across shards
Automatic failover and high availability without the need for replica sets
When should you consider using a hashed index in MongoDB?
When preserving the sort order of results is crucial.
To index geospatial data for location-based queries.
For highly selective queries on a single field.
When you need to perform exact value lookups.
What role does an arbiter node play in a MongoDB replica set?
It stores a copy of the data for redundancy.
It processes read and write operations like other nodes.
It participates in elections but doesn't store data.
It manages backups and restores for the replica set.
How can you improve the performance of a $lookup operation in MongoDB?
Avoid using $lookup altogether
Use $project to limit fields returned after the $lookup
Use $sort after the $lookup stage
Use $match to filter documents before the $lookup stage
In MongoDB, what does 'least privilege' refer to in the context of security?
Using the least complex password policy possible
Granting users only the minimum permissions necessary to perform their tasks
Minimizing the number of users with administrative access
Disabling all unnecessary MongoDB features
Which of the following is a disadvantage of using the MongoDB In-Memory Storage Engine?
Limited data size capacity
Lack of support for indexing
Increased complexity in configuration
Slower write speeds compared to WiredTiger
Which component in a sharded cluster is responsible for routing read and write operations to the appropriate shards?
Replica set
Config server
Shard server
Mongos router
Which of the following is NOT a built-in authentication mechanism in MongoDB?
API Key Authentication
LDAP
SCRAM-SHA-1
x.509 Certificate Authentication
What is the primary purpose of roles in MongoDB's authorization system?
To define granular permissions for database operations
To manage user authentication
To enforce data validation rules
To encrypt data at rest