MongoDB connection information
  • 17 Jul 2024
  • PDF

MongoDB connection information

  • PDF

Article summary

summary

This is the help page for setting up MongoDB connection information.

entry

item nameindispensableContents
NameYesEnter the name of the connection information to be used inside TROCCO.
memoNoEnter a note of connection information to be used inside TROCCO.
Connection typeNoPlease select from the following
  • standard
  • DNS Seed List (SRV)

  • If you are using MongoDB Atlas, please select DNS Seed List (SRV).
    For more information on connection types, please refer to the official documentation - Connection String URI Format.
    hostYesEnter a host name or IP address.
    destination portYesEnter the port number of the database to connect to. The default port number for MongoDB is 27017.
    Authentication methodNoPlease select from the following
    • SCRAM_SHA_1
    • MONGODB_CR
    • Based on server version
      • Version 3.0 or higher: Use SCRAM_SHA_1.
      • For versions less than 3.0: Use MONGODB_CR.
    For more information on authentication methods, please refer to the official documentation - Authentication.
    userNoPlease enter a user name for authentication.
    (computer) passwordNoPlease enter the password for authentication.
    Authentication databaseNoPlease enter the authentication database (authSource). If not specified, it will be admin.
    Read settingsYesPlease choose one of the options. The default is PRIMARY.
    For details on read preferences, see "About Read Preferences" below.
    MongoDB authentication settings

    MongoDB can be connected to without user authentication settings.
    However, TROCCO recommends that you set up user authentication.

    About Read Preferences

    For more information on read preferences, please refer to the official documentation - Read Preference.

    SelectionContent
    primary(default) Routes all read operations to the primary node of the current replica set.
    primaryPreferredRoute all read operations to the primary node. If the primary is unavailable, such as during automatic failover, read requests are routed to the secondary node instead.
    secondaryRoutes all read operations to one of the secondary nodes.
    secondaryPreferredRoutes all read operations to one of the available secondary nodes. If the secondary is not available, it is routed to the primary instead.
    nearestThe node with the lowest network latency is selected for routing. Primary and secondary are treated equally.

    Was this article helpful?