[JAVA-596] In case of replica set members which are located in different data center, are reads from the java driver will be data center aware? Created: 03/Jul/12 Updated: 11/Sep/19 Resolved: 03/Jul/12 |
|
| Status: | Closed |
| Project: | Java Driver |
| Component/s: | Connection Management |
| Affects Version/s: | 2.0 |
| Fix Version/s: | None |
| Type: | Task | Priority: | Critical - P2 |
| Reporter: | Vineet Saini | Assignee: | Unassigned |
| Resolution: | Done | Votes: | 0 |
| Labels: | driver | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Description |
|
One of our projects using replica sets which will be deployed across 2 data centers. Our plan is to use slaves in both data centers to serve reads. We are ok to write across datacenter but reads need to be served locally. We have set slveOk = true in our application. |
| Comments |
| Comment by Scott Hernandez (Inactive) [ 03/Jul/12 ] |
|
The java driver will connect to the closest replica, when using slaveOk/ReadPreference.Secondary, so queries will stay in the local datacenter. All writes must go to the primary in whichever DC it is in. |