FailoverBehavior options and Load Balancing

266 views
Skip to first unread message

ReverentGeek

unread,
May 9, 2012, 11:35:53 AM5/9/12
to ravendb
We currently have two RavenDB servers in a master <--> master
configuration. The current Client API configuration is set to
AllowReadsFromSecondariesAndWritesToSecondaries so that if the primary
server goes down, clients will automatically fail over to the other
server. I have two questions:

1. From what I've read, FailoverBehavior.ReadFromAllServers will
utilize all available servers for reads, and writes go only to the
primary. Does the AllowReadsFromSecondariesAndWritesToSecondaries
option also utilize all available servers for reads? This would be
ideal for our scenario: automatic failover for writes and load
balancing for reads.

2. As I understand it, the client API connects to the primary server
and learns about the other secondaries from the primary. If the
primary fails, it knows what secondaries to try. However, what if the
client is restarted while the primary is down? Is there a way to let
the client know about the secondaries available as part of the
DocumentStore configuration?

Thanks!
David

Oren Eini (Ayende Rahien)

unread,
May 9, 2012, 11:39:08 AM5/9/12
to rav...@googlegroups.com
1) No, you need to do:
ReadFromAllServers   |   AllowReadsFromSecondariesAndWritesToSecondaries 

2) There is a local cache that is used for htis need

ReverentGeek

unread,
May 9, 2012, 11:44:48 AM5/9/12
to ravendb
That is awesome. Thanks, Oren!

On May 9, 10:39 am, "Oren Eini (Ayende Rahien)" <aye...@ayende.com>
wrote:
Reply all
Reply to author
Forward
0 new messages