[DOCS-7583] Remove recommendation to use secondary read to distribute read load to replica sets Created: 05/Apr/16  Updated: 30/Oct/23

Status: Closed
Project: Documentation
Component/s: manual, Server
Affects Version/s: None
Fix Version/s: Server_Docs_20231030

Type: Bug Priority: Major - P3
Reporter: Kevin Adistambha Assignee: Unassigned
Resolution: Won't Do Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Related
is related to DOCS-7315 [SERVER] Update load balance section Closed
Participants:
Days since reply: 1 year, 14 weeks, 2 days ago
Epic Link: DOCSP-1769

 Description   

The docs page at: https://docs.mongodb.org/manual/reference/read-preference/#reduce-load-on-the-primary

stated that:

To shift read load from the primary, use mode secondary. Although secondaryPreferred is tempting for this use case, it carries some risk: if all secondaries are unavailable and your set has enough arbiters to prevent the primary from stepping down, then the primary will receive all traffic from clients. If the primary is unable to handle this load, queries will compete with writes. For this reason, use secondary to distribute read load to replica sets, not secondaryPreferred.

Without a proper context regarding secondary read use cases, this is a misleading paragraph at best, and incorrect at worst. This is because:

  • The secondaries are doing just as much writes as the primary. Shifting reads to the secondaries without a good reason compromises the replica set's high availability function.
  • The replica set overall could be burdened with more reads than what it could actually handle. When one node fails, the rest of the set could be flooded with reads that could bring down the whole set.
  • The secondaries are eventually consistent with the primary, so there is a chance that stale data is read.

To make matters worse, this page: https://docs.mongodb.org/manual/core/read-preference/#counter-indications stated:

In general, do not use secondary and secondaryPreferred to provide extra capacity for reads

thus we are giving users conflicting information.



 Comments   
Comment by Education Bot [ 31/Oct/22 ]

Hello! This ticket has been closed due to inactivity. If you believe this ticket is still important, please reopen it and leave a comment to explain why. Thank you!

Generated at Thu Feb 08 07:54:35 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.