Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't connect to multiple servers #85

Open
Make42 opened this issue Jun 17, 2015 · 1 comment
Open

Can't connect to multiple servers #85

Make42 opened this issue Jun 17, 2015 · 1 comment

Comments

@Make42
Copy link

Make42 commented Jun 17, 2015

Creating a mongoDB connection can only be done to one server with

  mongo <- mongo.create(host = "myserver1:27017")

and not multiple servers like

  mongo <- mongo.create(host = "myserver1:27017, myserver2:27017, myserver3:27017")
  # or alternatively:
  mongo <- mongo.create(host = c("myserver1:27017", "myserver2:27017", "myserver3:27017"))

however for mongoDB it is necessary, to connect to the master node, which is switching from time to time. Therefore I would like to have two features implemented:

1 It should be possible to set multiple servers and rmongodb is looking autonomously which one is the master.
2 It should be possible to set the setting

  slave = "ok"

for those use-cases in which rmongodb only reads. This feature would allow to read from a slave node (writing to a slave is not possible for mongoDB), and would reduce the load on the master node.

@dselivanov
Copy link
Owner

Last code chunk should work. Please, check this SO thread.
If not, let me know.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants