Navigation
This version of the documentation is archived and no longer supported.

Production Cluster Architecture

On this page

In a production cluster, you must ensure that data is redundant and that your systems are highly available. To that end, a production cluster must have the following components:

Components

Config Servers

Three config servers. Each config server must be on separate machines. A single sharded cluster must have exclusive use of its config servers. If you have multiple sharded clusters, you will need to have a group of config servers for each cluster.

Shards

Two or more replica sets. These replica sets are the shards. For information on replica sets, see Replication.

Query Routers (mongos)

One or more mongos instances. The mongos instances are the routers for the cluster. Typically, deployments have one mongos instance on each application server.

You may also deploy a group of mongos instances and use a proxy/load balancer between the application and the mongos. In these deployments, you must configure the load balancer for client affinity so that every connection from a single client reaches the same mongos.

Because cursors and other resources are specific to an single mongos instance, each client must interact with only one mongos instance.

Example

Diagram of a sample sharded cluster for production purposes.  Contains exactly 3 config servers, 2 or more ``mongos`` query routers, and at least 2 shards. The shards are replica sets.