Skip to content

Update sharded-cluster-components.txt #3146

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: v3.4
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 7 additions & 10 deletions source/core/sharded-cluster-components.txt
Original file line number Diff line number Diff line change
Expand Up @@ -56,16 +56,13 @@ each application server. Deploying one :program:`mongos` router on each
application server reduces network latency between the application and
the router.

Alternatively, you can place a :program:`mongos` router on each shard
primary. This approach also reduces network latency between the
application and the router: applications use a :term:`connection
string` listing all the hostnames of each shard primary. The MongoDB
driver then determines the network latency for each :program:`mongos`
and load balances randomly across the routers that fall within a set
:ref:`latency window <selection-discovery-options>`. Ensure that the
server hosting the shard primary and :program:`mongos` router has
sufficient capacity to accommodate the extra CPU and memory
requirements.
Alternatively, you can place a :program:`mongos` router on dedicated servers.
Large deployments benefit from this approach by reducing the number of active
connections between many application servers and :program:`mongod`. Having the
intermediary level also allows :program:`mongos` to have a large memory
footprint without impacting the application servers. It is possible to
use primary shards to host :program:`mongos` routers but be aware that memory
contention may become an issue on large deployments.

There is no limit to the number of :program:`mongos` routers you can
have in a deployment. However, as :program:`mongos` routers communicate
Expand Down