[DOCS-2334] mongos and load balancer settings Created: 02/Dec/13  Updated: 11/Jan/17  Resolved: 17/Jan/14

Status: Closed
Project: Documentation
Component/s: manual
Affects Version/s: None
Fix Version/s: 01112017-cleanup

Type: Bug Priority: Critical - P2
Reporter: A. Jesse Jiryu Davis Assignee: Sam Kleinman (Inactive)
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Related
Participants:
Days since reply: 10 years, 10 weeks, 6 days ago

 Description   

Some users want to connect to mongoses via a load balancer, e.g. to scale out mongoses while using a single connection string, or as a network-security layer. We sort of suggest this when we say "You may also may deploy a group of mongos instances and use a proxy/load balancer between the application and the mongos.".

In such a case the load balancer must be configured for "client affinity": every connection from a given client IP must be routed to the same mongos as other connections from that client. Mere "socket affinity" where connections from one client can be routed to several mongoses won't work. The main problem is that OP_GETMORE messages may go to a different mongos than the initial query, [as Craig Wilson pointed out|craiggwilson.com/2013/10/21/load-balanced-mongos/].

An additional problem is when upgrading mongoses from one wire-protocol version to the next: the driver may call ismaster on one mongos and get protocol version X, then try to talk to a different mongos which only speaks wire-protocol version Y. This is avoided if all the connections from any single client use the same mongos.

So let's make a page on load balancers with more detailed recommendations, emphasizing client affinity.



 Comments   
Comment by Githook User [ 05/Dec/13 ]

Author:

{u'username': u'tychoish', u'name': u'Sam Kleinman', u'email': u'samk@10gen.com'}

Message: DOCS-2334: edits to load balancing page
Branch: master
https://github.com/mongodb/docs/commit/521041c11ad7fa26bb8d4bc0a5cff8cbb130fb3c

Comment by Githook User [ 05/Dec/13 ]

Author:

{u'username': u'tychoish', u'name': u'Sam Kleinman', u'email': u'samk@10gen.com'}

Message: DOCS-2334: reorganizing production notes page, adding architecture section, and including links to architectural recomendations
Branch: master
https://github.com/mongodb/docs/commit/ca276293488ecd849b3d0b1859fa41de2c2ddb89

Comment by Githook User [ 05/Dec/13 ]

Author:

{u'username': u'tychoish', u'name': u'Sam Kleinman', u'email': u'samk@10gen.com'}

Message: DOCS-2334: add note about load balancing mongos
Branch: master
https://github.com/mongodb/docs/commit/406b222398669fbe7f966cd7fa35854f1562bb8c

Comment by Githook User [ 05/Dec/13 ]

Author:

{u'username': u'tychoish', u'name': u'Sam Kleinman', u'email': u'samk@10gen.com'}

Message: DOCS-2334: edits to load balancing page
Branch: v2.4
https://github.com/mongodb/docs/commit/2c2da54854a2ca7b7fd1f8f4e2563cbf79262206

Comment by Githook User [ 05/Dec/13 ]

Author:

{u'username': u'tychoish', u'name': u'Sam Kleinman', u'email': u'samk@10gen.com'}

Message: DOCS-2334: reorganizing production notes page, adding architecture section, and including links to architectural recomendations
Branch: v2.4
https://github.com/mongodb/docs/commit/7d8970a34f77c9a063083aca51bffd17e77c7414

Comment by Githook User [ 05/Dec/13 ]

Author:

{u'username': u'tychoish', u'name': u'Sam Kleinman', u'email': u'samk@10gen.com'}

Message: DOCS-2334: add note about load balancing mongos
Branch: v2.4
https://github.com/mongodb/docs/commit/a5543d18d5531c0bb4a3033ee2713b7544589af7

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