[CSHARP-203] Plugin load balancer for distributing reads to secondaries Created: 12/Apr/11  Updated: 11/Mar/19  Resolved: 06/Apr/15

Status: Closed
Project: C# Driver
Component/s: Feature Request
Affects Version/s: 1.0
Fix Version/s: None

Type: New Feature Priority: Major - P3
Reporter: Robert Stam Assignee: Unassigned
Resolution: Won't Fix Votes: 3
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Related
related to CSHARP-686 Replace RequestStart/Done with thread... Closed

 Description   

Currently the C# driver is hard coded to distribute reads to secondaries (when slaveOk=true) using a round robin algorithm. However, alternative strategies exist. For example, reads could be distributed in proportion to the distance of the secondaries as measured by ping time. If the driver defined an IReadLoadBalancer interface it could provide two reference implementations: RoundRobinLoadBalancer and ProportionalDistanceLoadBalancer, and application writers could write new load balancers to meet their specific requirements.



 Comments   
Comment by Robert Stam [ 04/Apr/13 ]

Reassigning this issue to 2.0 to be either resolved or closed as won't implement.

Comment by Robert Stam [ 04/Apr/13 ]

This functionality could also be achieved if we adopt the concept of binding proposed in CSHARP-686.

To do your own load balancing, you would simply select a node from a cluster (using any criteria you want) and then bind a MongoDatabase instance to that node for the duration of some sequence of related operations.

For the next sequence of related operations you could repeat the process of selecting a node and bind a new MongoDatabase instance to that node, and so on.

Generated at Wed Feb 07 21:36:06 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.