ExamGecko
Question list
Search
Search

List of questions

Search

Related questions











Question 320 - DBS-C01 discussion

Report
Export

A company has an existing system that uses a single-instance Amazon DocumentDB (with MongoDB compatibility) cluster. Read requests account for 75% of the system queries. Write requests are expected to increase by 50% after an upcoming global release. A database specialist needs to design a solution that improves the overall database performance without creating additional application overhead.

Which solution will meet these requirements?

A.
Recreate the cluster with a shared cluster volume. Add two instances to serve both read requests and write requests.
Answers
A.
Recreate the cluster with a shared cluster volume. Add two instances to serve both read requests and write requests.
B.
Add one read replica instance. Activate a shared cluster volume. Route all read queries to the read replica instance.
Answers
B.
Add one read replica instance. Activate a shared cluster volume. Route all read queries to the read replica instance.
C.
Add one read replica instance. Set the read preference to secondary preferred.
Answers
C.
Add one read replica instance. Set the read preference to secondary preferred.
D.
Add one read replica instance. Update the application to route all read queries to the read replica instance.
Answers
D.
Add one read replica instance. Update the application to route all read queries to the read replica instance.
Suggested answer: C

Explanation:

By default, an application directs its read operations to the primary member in a replica set (i.e. read preference mode 'primary'). But, clients can specify a read preference to send read operations to secondaries. https://www.mongodb.com/docs/manual/core/read-preference/

A read replica instance is an Amazon DocumentDB instance that supports only read operations. An Amazon DocumentDB cluster can have up to 15 replicas in addition to the primary instance.Having multiple replicas enables you to distribute read workloads and increase the read throughput of your cluster1.

The read preference option determines how your MongoDB client or driver routes read requests to instances in your Amazon DocumentDB cluster.The secondary preferred option instructs the client to route read queries to the replicas, unless none are available, in which case the queries are routed to the primary instance2. This option can improve the overall database performance by offloading read requests from the primary instance, which handles all write requests, and balancing them across the replicas.

Using this solution, the company can:

Improve the overall database performance by adding one read replica instance and setting the read preference to secondary preferred.

Avoid creating additional application overhead by using the built-in read preference capabilities of the MongoDB client or driver, without having to update the application code or connection string.

Handle the expected increase in write requests by freeing up resources on the primary instance.

asked 16/09/2024
Faizan Ahmed
39 questions
User
Your answer:
0 comments
Sorted by

Leave a comment first