Connection Configuration for MongoDB

Prev Next

summary

This is the help page for setting up Connection Configuration for MongoDB.

entry

item name indispensable Contents
Name Yes Enter the name of the Connection Configuration to be used inside TROCCO.
memo No Enter a note of Connection Configuration to be used inside TROCCO.
Connection type No Please 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.
    host Yes Enter a host name or IP address.
    destination port Yes Enter the port number of the database to connect to. The default port number for MongoDB is 27017.
    Authentication method No Please 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.
    user No Please enter a user name for authentication.
    (computer) password No Please enter the password for authentication.
    Authentication database No Please enter the authentication database (authSource). If not specified, it will be admin.
    Read settings Yes Please choose one of the options. The default is PRIMARY.
    See "About Read Preferences" below for more information about read preferences.
    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.

    Selection Content
    primary (default) Routes all read operations to the primary node of the current replica set.
    primaryPreferred Route 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.
    secondary Routes all read operations to one of the secondary nodes.
    secondaryPreferred Routes all read operations to one of the available secondary nodes. If the secondary is not available, it is routed to the primary instead.
    nearest The node with the lowest network latency is selected for routing. Primary and secondary are treated equally.