On Thursday, April 26, 2012 3:40:46 AM UTC+12, Kyle Banker wrote:
The Ruby driver will soon support an option with the same meaning as :read => :any, which will read from the closest member.
Ok cool, as long as I know it's coming. Is there a JIRA ticket? I couldn't find one.
Are the machines in the same data center? If you, you might consider dividing up reads based on the database (or collections) being read from. You might also consider randomly choosing:
:read => [:primary, :secondary][rand(2)]
Yes they are, I'll give that a go, thanks.
Side question: Do you have arbiter? That's pretty important for failover.
Thanks for your concern. :) Yup I have an arbiter, I'm not new at MongoDB, just the Ruby driver.
Cheers,
Matt