-
Notifications
You must be signed in to change notification settings - Fork 40
Description
Is your feature request related to a problem?
I'm need to set my readOnly connections from Hoop.dev to my MongoDB clusters to connect only in secondary nodes to avoid read queries in my primary nodes.
Describe the solution you'd like
I would like to ask to implement a feature to use some connection string options.
or at least read-preference options and readPreferenceTags to point for use the options like
- primary (Default)
- primaryPreferred
- secondary
- secondaryPreferred
- nearest
and a specific node with readPreferenceTags.
making hoop.dev able to use strings like
- mongodb+srv://:@.xxx.mongodb.net/?readPreference=secondary
- mongodb+srv://:@.xxx.mongodb.net/?readPreference=secondary&readPreferenceTags=nodeType:ANALYTICS
Describe alternatives you've considered
No response
Priority
Medium - Would improve my workflow
Use Case
I have some users connection on hoop.dev read-only users but exhausting a primary node resources thinking that are doing a safe query.
I tried to use this connection string
mongodb+srv://<user>:<pass>@<cluster>.xxx.mongodb.net/<myDB>?readPreference=secondary&readPreferenceTags=nodeType:ANALYTICS
but hoop.dev uses only this piece
mongodb+srv://<user>:<pass>@<cluster>.xxx.mongodb.net/<myDB>
Mockups or Examples
No response
Additional Context
No response
Contribution
- I would be willing to submit a PR to implement this feature
Code of Conduct
- I agree to follow this project's Code of Conduct