Which component in a sharded cluster is responsible for routing read and write operations to the appropriate shards?
Shard server
Mongos router
Replica set
Config server
In a MongoDB replica set, which node accepts write operations?
Arbiter
Secondary
Any node
Primary
When should you consider using a hashed index in MongoDB?
To index geospatial data for location-based queries.
When preserving the sort order of results is crucial.
For highly selective queries on a single field.
When you need to perform exact value lookups.
Which stage of the MongoDB write path is responsible for applying write operations to the journal?
Apply Operation
Intent Shared Lock
Write to Journal
Release Locks
Which operator within the $lookup stage specifies the field in the 'joined' collection that should match the 'localField'?
foreignField
from
as
localField
Which of the following is NOT a recommended practice for performance tuning in MongoDB?
Monitoring and profiling query performance
Optimizing schema design for data access patterns
Running multiple instances of mongod on a single core machine
Using appropriate indexes for frequently queried fields
What is the role of SSL/TLS in securing MongoDB deployments?
Encrypting communication between MongoDB clients and servers
Providing a mechanism for user authentication
Encrypting data at rest within the database files
Auditing and logging database access
Which component of MongoDB's architecture is responsible for managing data access and concurrency?
Config Server
Query Engine
Router
Storage Engine
What is the significance of regularly rotating encryption keys used with MongoDB?
It mitigates the impact of a potential key compromise.
It prevents data corruption within the database.
It improves query performance by reducing index size.
It enables faster data recovery after a server failure.
What happens during a failover event in a MongoDB replica set?
Data is automatically restored from backups.
A new primary node is elected from the available secondaries.
The primary node automatically recovers.
All read and write operations are halted indefinitely.