Docs Menu

Advanced Connection Tab

On this page

  • Procedure

The Advanced connection tab provides additional connection options for your deployment. These options can be used with the General, Authentication, TLS / SSL, and Proxy / SSH Tunnel connection options.

1
New Advanced Connection Options
2

(Optional) Select a Read Preference from the following options:

Read Preference
Description
Primary
Default mode. All operations read from the current replica set primary. If the primary is unavailable, the operation fails.
Primary Preferred
Operations read from the primary unless the primary is unavailable. If the primary is unavailable, operations read from secondary members.
Secondary
All operations read from the secondary members of the replica set. If the secondary is unavailable, the operation fails.
Secondary Preferred
Operations read from the secondary unless the secondary is unavailable. If the secondary is unavailable, operations read from the primary on sharded clusters.
Nearest

Operations read from a random eligible replica set member, irrespective of whether that member is a primary or secondary, based on a specified latency threshold. The operation considers the following when calculating latency:

Tip
See also:
Field
Description
Replica Set Name
(Optional) Name of replica set.
Default Authentication Database
(Optional) Authentication database used when authSource is not specified. For more information, see Authentication Options.
URI Options
Additional options to customize your connection. You specify these options as key-value pairs, and Compass automatically adds the key-value pairs to the connection string. For more information, see Connection String Options.
3
Tip
See also:

To disconnect from your deployment, see Disconnect from MongoDB.

←  Proxy / SSH Tunnel Connection TabRequired Access →

On this page

Give Feedback
© 2022 MongoDB, Inc.

About

  • Careers
  • Investor Relations
  • Legal Notices
  • Privacy Notices
  • Security Information
  • Trust Center
© 2022 MongoDB, Inc.