Skip to content
This repository has been archived by the owner on Oct 2, 2023. It is now read-only.

add read preference to mongo config #357

Open
wants to merge 11 commits into
base: master
Choose a base branch
from

Conversation

davidpolaniaac
Copy link

Read preference describes how MongoDB clients route read operations to the members of a replica set.

SecondaryPreferred is operations read from secondary members but if no secondary members are available, operations read from the primary

This greatly optimizes the load on the database. the writing operations are carried out on the primary node and the reading operations on the secondary ones. It makes better use of secondary resources, it also increases the speed of operations since the primary node is not overloaded. In case you do not have a replica set, the operations are performed in the primary node without problems.

@trafico-bot trafico-bot bot added the 🔍 Ready for Review Pull Request is not reviewed yet label Oct 13, 2021
@davidpolaniaac
Copy link
Author

@rvema

Copy link
Contributor

@rvema rvema left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you please address the review comments?

@trafico-bot trafico-bot bot added ⚠️ Changes requested Pull Request needs changes before it can be reviewed again and removed 🔍 Ready for Review Pull Request is not reviewed yet labels Oct 13, 2021
@trafico-bot trafico-bot bot added 🔍 Ready for Review Pull Request is not reviewed yet and removed ⚠️ Changes requested Pull Request needs changes before it can be reviewed again labels Oct 13, 2021
@davidpolaniaac
Copy link
Author

@rvema

@davidpolaniaac
Copy link
Author

@danielyhuang

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
🔍 Ready for Review Pull Request is not reviewed yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants