Good Morning,
I am using RavenDB installed as Windows Service
on 2 different servers.
Fail-over behavior is set to: FailoverBehavior.AllowReadsFromSecondariesAndWritesToSecondaries
and replication ( master => master
) between those servers is enabled as well.
It's all working well in terms of replication.
I would like to Load-balance RavenDB
now, as I am not sure if connections are using both servers to deal with requests when both servers are up and running.
Is there any difference in terms of Load Balancing due to way of hosting RavenDB
( Windows Service, IIS
)
I was also considering setting up a Load Balancer on top of the RavenDB
boxes, that would let request to be handled by different boxes and rely on replication so the data is consistent in both servers.
I not sure if that's right way of dealing with RavenDB
though.
Any help would be appreciated.
Thank you.
Load Balancing can be set by setting the FailoverBehavior to:
FailoverBehavior = FailoverBehavior.AllowReadsFromSecondariesAndWritesToSecondaries
| FailoverBehavior.ReadFromAllServers;
This has the effect of making the RavenDB client round robin between the two servers.
In RavenDB 3.5, you can even specify required SLAs, so you can always use the faster server.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.