[DOCS-12322] Do we have documentation warning users against using load balancers with sharded clusters? Created: 04/Jan/19  Updated: 30/Oct/23

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

Type: Task Priority: Major - P3
Reporter: Daniel Aprahamian (Inactive) Assignee: Unassigned
Resolution: Won't Do Votes: 0
Labels: docs-sharding
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Participants:
Days since reply: 1 year, 14 weeks, 2 days ago
Epic Link: DOCSP-1769
Story Points: 0.5

 Description   

Description

Hi Docs,

We recently had ticket NODE-1530, where a user ran into cursor issues b/c they were using a load balancer in front of a sharded cluster. The solution was to remove the load balancer and switch to using SRV records.

Another user commented that they would like there to be documentation for this issue to warn users who experience similar errors. Do we currently have any documentation on this subject?

Thanks,
Dan

Scope of changes

Impact to Other Docs

MVP (Work and Date)

Resources (Scope or Design Docs, Invision, etc.)



 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!

Comment by Daniel Aprahamian (Inactive) [ 07/Jan/19 ]

alyson.cabral you can see the error in NODE-1530:

MongoError: Cursor not found (namespace: 'liveearth.hallMonitorCollectors', id: 5109468296066159828).
 at /usr/src/app/node_modules/mongodb-core/lib/connection/pool.js:593:63
 at authenticateStragglers (/usr/src/app/node_modules/mongodb-core/lib/connection/pool.js:516:16)
 at Connection.messageHandler (/usr/src/app/node_modules/mongodb-core/lib/connection/pool.js:552:5)
 at emitMessageHandler (/usr/src/app/node_modules/mongodb-core/lib/connection/connection.js:309:10)
 at Socket.<anonymous> (/usr/src/app/node_modules/mongodb-core/lib/connection/connection.js:452:17)
 at Socket.emit (events.js:182:13)
 at addChunk (_stream_readable.js:283:12)
 at readableAddChunk (_stream_readable.js:264:11)
 at Socket.Readable.push (_stream_readable.js:219:10)
 at TCP.onread (net.js:635:20)

Googling MongoError: Cursor not found turns upĀ https://stackoverflow.com/questions/46423442/mongodb-cursor-not-found.

Comment by Jeffrey Yemin [ 07/Jan/19 ]

The most common error will be related to a cursor not being found, since the scenario is typically:

  1. Establish cursor on mongos 1 (via LB) via find/aggregate
  2. Execute a getMore operation that hits a different mongos (via LB).
Comment by Alyson Cabral (Inactive) [ 07/Jan/19 ]

I think this is worth calling out. Not sure where would be best though. Daniel, what types of errors were people getting? My first instinct would be to pop that error message into google. This may be better served by making sure we are answering questions on SO or whatever comes up on google when you type the error messages in.

Comment by Ravind Kumar (Inactive) [ 04/Jan/19 ]

https://docs.mongodb.com/manual/administration/production-checklist-operations/#load-balancing I think is the only section we have that covers anything related to load balancing. It does talk about 'sticky sessions', though it's not obvious this is in relation to connections between a client <-> mongos. that seems like a prudent fixup, possibly with one or more cross references in the sharding

alyson.cabral would we happen to have any more specific guidance on load balancers and sharded clusters? We might also benefit from input from the TSE/CE team here as well.

Comment by Bernie Hackett [ 04/Jan/19 ]

It's mentioned here, but with no real detail:

https://docs.mongodb.com/manual/administration/production-checklist-operations/#load-balancing

Generated at Thu Feb 08 08:04:57 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.