.\" Man page generated from reStructuredText. . .TH "MONGOS" "1" "March 18, 2014" "2.6" "mongodb-manual" .SH NAME mongos \- MongoDB Sharded Cluster Query Router . .nr rst2man-indent-level 0 . .de1 rstReportMargin \\$1 \\n[an-margin] level \\n[rst2man-indent-level] level margin: \\n[rst2man-indent\\n[rst2man-indent-level]] - \\n[rst2man-indent0] \\n[rst2man-indent1] \\n[rst2man-indent2] .. .de1 INDENT .\" .rstReportMargin pre: . RS \\$1 . nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin] . nr rst2man-indent-level +1 .\" .rstReportMargin post: .. .de UNINDENT . RE .\" indent \\n[an-margin] .\" old: \\n[rst2man-indent\\n[rst2man-indent-level]] .nr rst2man-indent-level -1 .\" new: \\n[rst2man-indent\\n[rst2man-indent-level]] .in \\n[rst2man-indent\\n[rst2man-indent-level]]u .. .SH SYNOPSIS .sp \fBmongos\fP for "MongoDB Shard," is a routing service for MongoDB shard configurations that processes queries from the application layer, and determines the location of this data in the \fIsharded cluster\fP, in order to complete these operations. From the perspective of the application, a \fBmongos\fP instance behaves identically to any other MongoDB instance. .SH OPTIONS .SS Core Options .INDENT 0.0 .TP .B mongos .UNINDENT .INDENT 0.0 .TP .B \-\-help, \-h Returns information on \fBmongos\fP options and usage. .UNINDENT .INDENT 0.0 .TP .B \-\-version Returns the \fBmongos\fP release number. .UNINDENT .INDENT 0.0 .TP .B \-\-config , \-f Specifies a configuration file for runtime configuration options. The configuration file is the preferred method for runtime configuration of \fBmongos\fP\&. The options are equivalent to the command\-line configuration options. See http://docs.mongodb.org/manual/reference/configuration\-options for more information. .sp Ensure the configuration file uses ASCII encoding. \fBmongos\fP does not support configuration files with non\-ASCII encoding, including UTF\-8. .UNINDENT .INDENT 0.0 .TP .B \-\-verbose, \-v Increases the amount of internal reporting returned on standard output or in log files. Increase the verbosity with the \fB\-v\fP form by including the option multiple times, (e.g. \fB\-vvvvv\fP\&.) .UNINDENT .INDENT 0.0 .TP .B \-\-quiet Runs \fBmongos\fP in a quiet mode that attempts to limit the amount of output. This option suppresses: .INDENT 7.0 .IP \(bu 2 output from \fIdatabase commands\fP .IP \(bu 2 replication activity .IP \(bu 2 connection accepted events .IP \(bu 2 connection closed events .UNINDENT .UNINDENT .INDENT 0.0 .TP .B \-\-port Specifies the port number when the MongoDB instance is not running on the standard port of \fB27017\fP\&. You may also specify the port number using the \fB\-\-host\fP option. .UNINDENT .INDENT 0.0 .TP .B \-\-bind_ip Specifies the IP address that the \fBmongos\fP process binds to and listens for connections on. By default \fBmongos\fP listens for connections for all interfaces. You may attach \fBmongos\fP to any interface. When attaching \fBmongos\fP to a publicly accessible interface, ensure that you have implemented proper authentication and firewall restrictions to protect the integrity of your database. .UNINDENT .INDENT 0.0 .TP .B \-\-maxConns Specifies the maximum number of simultaneous connections that \fBmongos\fP will accept. This setting will have no effect if the value of this setting is higher than your operating system\(aqs configured maximum connection tracking threshold. .sp This setting is particularly useful for \fBmongos\fP if you have a client that creates a number of collections but allows them to timeout rather than close the collections. When you set \fBmaxConns\fP, ensure the value is slightly higher than the size of the connection pool or the total number of connections to prevent erroneous connection spikes from propagating to the members of a \fIsharded cluster\fP\&. .sp Changed in version 2.6: MongoDB removed the upward limit on the \fBmaxConns\fP setting. .UNINDENT .INDENT 0.0 .TP .B \-\-syslog Sends all logging output to the host\(aqs \fIsyslog\fP system rather than to standard output or a log file as with \fI\%\-\-logpath\fP\&. .sp \fI\%\-\-syslog\fP is not supported on Windows. .UNINDENT .INDENT 0.0 .TP .B \-\-syslogFacility Specifies the facility level used when logging messages to syslog. The default is \fBuser\fP\&. The value you specify must be supported by your operating system\(aqs implementation of syslog. To use this option, you must enable the \fI\%\-\-syslog\fP option. .UNINDENT .INDENT 0.0 .TP .B \-\-logpath Specifies the path for the log file that holds all diagnostic logging information. .sp Unless specified, \fBmongos\fP will output all log information to the standard output. Additionally, unless you also specify \fI\%\-\-logappend\fP, the logfile will be overwritten when the process restarts. .sp \fBNOTE:\fP .INDENT 7.0 .INDENT 3.5 The behavior of the logging system may change in the near future in response to the \fI\%SERVER\-4499\fP case. .UNINDENT .UNINDENT .UNINDENT .INDENT 0.0 .TP .B \-\-logappend Appends new entries to the end of the logfile when the \fBmongos\fP restarts instead of overwriting the content of the log. .UNINDENT .INDENT 0.0 .TP .B \-\-timeStampFormat Specifies the time format for timestamps in log messages. Specify one of the following values: .TS center; |l|l|. _ T{ Value T} T{ Description T} _ T{ \fBctime\fP T} T{ Displays timestamps as \fBWed Dec 31 18:17:54.811\fP\&. T} _ T{ \fBiso8601\-utc\fP T} T{ Displays timestamps in Coordinated Universal Time (UTC) in the ISO\-8601 format. For example, for New York at the start of the Epoch: \fB1970\-01\-01T00:00:00.000Z\fP T} _ T{ \fBiso8601\-local\fP T} T{ Default value. Displays timestamps in local time in the ISO\-8601 format. For example, for New York at the start of the Epoch: \fB1969\-12\-31T19:00:00.000+0500\fP T} _ .TE .UNINDENT .INDENT 0.0 .TP .B \-\-pidfilepath Specifies a file location to hold the "\fIPID\fP" or process ID of the \fBmongos\fP process. Useful for tracking the \fBmongos\fP process in combination with the \fI\%\-\-fork\fP option. .sp Without a specified \fI\%\-\-pidfilepath\fP option, \fBmongos\fP creates no PID file. .UNINDENT .INDENT 0.0 .TP .B \-\-keyFile Specifies the path to a key file to store authentication information. This option is used for interprocess authentication among the \fBmongos\fP and \fBmongod\fP instances of a \fIsharded cluster\fP or \fIreplica set\fP\&. .UNINDENT .INDENT 0.0 .TP .B \-\-setParameter New in version 2.4. .sp Specifies an option to configure on startup. Specify multiple options with multiple \fI\%\-\-setParameter\fP options. See http://docs.mongodb.org/manual/reference/parameters for full documentation of these parameters. The \fBsetParameter\fP database command provides access to many of these parameters. \fI\%\-\-setParameter\fP supports the following options: .INDENT 7.0 .IP \(bu 2 \fBenableLocalhostAuthBypass\fP .IP \(bu 2 \fBenableTestCommands\fP .IP \(bu 2 \fBlogLevel\fP .IP \(bu 2 \fBlogUserIds\fP .IP \(bu 2 \fBnotablescan\fP .IP \(bu 2 \fBquiet\fP .IP \(bu 2 \fBsupportCompatibilityFormPrivilegeDocuments\fP .IP \(bu 2 \fBsyncdelay\fP .IP \(bu 2 \fBtextSearchEnabled\fP .IP \(bu 2 \fBuserCacheInvalidationIntervalSecs\fP .UNINDENT .UNINDENT .INDENT 0.0 .TP .B \-\-httpinterface New in version 2.6. .sp Enables the HTTP interface. Enabling the interface can increase network exposure. .sp Leave the HTTP interface \fIdisabled\fP for production deployments. If you \fIdo\fP enable this interface, you should only allow trusted clients to access this port. See \fIsecurity\-firewalls\fP\&. .sp \fBNOTE:\fP .INDENT 7.0 .INDENT 3.5 In MongoDB Enterprise, the HTTP Console does not support Kerberos Authentication. .UNINDENT .UNINDENT .UNINDENT .INDENT 0.0 .TP .B \-\-clusterAuthMode