...
- Servers: A comma separated list of server hosts and ports where the database is running. E.g.: "localhost" - "125.10.5.3, 125.10.5.4" - "192.168.3.1:27017, 192.168.3.2:27017"
- Database Name: The name of the database to which you want to connect.
Write Concern: The write concern value to control the write behaviour as well as exception raising on error conditions. The following options are available.
Option Description FSYNC_SAFE Exceptions are raised for network issues, and server errors. The write operation waits for the server to flush the data to disk. NONE No exceptions are raised, even for network issues. NORMAL Exceptions are raised for network issues, but not server errors. REPLICAS_SAFE Exceptions are raised for network issues, and server errors; waits for at least 2 servers for the write operation. SAFE Exceptions are raised for network issues, and server errors; waits on a server for the write operation. Read Preference: The read preference value which describes how MongoDB clients route read operations to members of a replica set. It has the following options.
Option Description PRIMARY Default mode. All operations read from the current replica set primary. SECONDARY All operations read from the secondary members of the replica set. - Auto Connect Retry: Controls whether or not to connect. That is, the system retries to connect automatically.
- Connection Timeout: Connection timeout in milliseconds. 0 is default and infinite.
- Max. Wait: Max wait time of a blocking thread for a connection.
- Socket Timeout: Socket timeout value. 0 is default and infinite.
- Connections per Host: If the number of connections allowed per host is exceeded, further connections will be blocked.
- Threads Allowed to Block For Connection Multiplier: This multiplierThe value in this field, multiplied with the connectionsPerHost settingby the connections per host, gives the maximum number of threads that may be waiting for a connection to become available from the pool. All further threads will get an exception right away. For example, if connectionsPerHost connections per host is 10 and threadsAllowedToBlockForConnectionMultiplier the 'threads allowed to block for connection multiplier' is 5, then up to 50 threads can wait for a connection.
...