Load balancing and efficient data reading when replication is available.

163 views
Skip to first unread message

KiranPVUthaman

unread,
May 16, 2012, 1:47:18 PM5/16/12
to ravendb
Hi,

I am starting off with setting up load balancing in my testing
environment. I have two RavenDB servers and both of them are
configured to replicate each other.

In my client application, I have the following code block:

documentStore1.Conventions.FailoverBehavior =
FailoverBehavior.ReadFromAllServers |
FailoverBehavior.AllowReadsFromSecondariesAndWritesToSecondaries;

I am expecting less write and frequent reads from my DB.

Interested to know whether the above code block I provided is going to
have any advantage in case of Load balancing during read. My intention
is that the read requests should be distributed among all the servers
available and thus helping in faster / efficient searching.

Also, keen to understand whether I should look for anything else as
part of Load balancing (for reading from DB). Having said this, I am
not so keen on the database sharding and would like to keep it as a
last option if nothing else comes out.

Any help will be appreciated.

Thanks in advance,
Kiran PV Uthaman

Itamar Syn-Hershko

unread,
May 16, 2012, 3:31:25 PM5/16/12
to rav...@googlegroups.com
Yes, using ReadFromAllServers will cause RavenDB to spread reads equally between all available servers

For most cases, you can get away of considering sharding at all at such an early stage, unless you see you can really benefit from it

KiranPVUthaman

unread,
May 17, 2012, 12:56:01 AM5/17/12
to ravendb
Thank you very much for the response.

On May 17, 12:31 am, Itamar Syn-Hershko <ita...@hibernatingrhinos.com>
wrote:
> Yes, using ReadFromAllServers will cause RavenDB to spread reads equally
> between all available servers
>
> For most cases, you can get away of considering sharding at all at such an
> early stage, unless you see you can really benefit from it
>
Reply all
Reply to author
Forward
0 new messages