A sharded cluster instance consists of three types of components: mongos, shard, and Configserver nodes. You can choose the configurations and number of mongos and shard nodes to create ApsaraDB for MongoDB sharded cluster instances that have different performance capabilities.

Architecture

Architecture
The following table describes the component types contained in a sharded cluster instance.
Component type Architecture Description
Mongos Standalone

A mongos node routes queries and writes to the corresponding shard nodes.

You can purchase multiple mongos nodes to implement load balancing and failover. By default, a single sharded cluster instance supports up to 32 mongos nodes.

Shard Replica set (primary, secondary, and hidden nodes + read-only nodes)

A shard node stores database data.

You can purchase multiple shard nodes to scale out instance storage and capability to handle concurrent read and write requests. By default, a single sharded cluster instance supports up to 32 shard nodes.
Important Read-only nodes must be purchased separately. The price of a single read-only node is the same as that of a single shard node.
ConfigServer Replica set (three nodes)

A Configserver node stores the metadata of shard nodes. Shard metadata is the types of data stored in each shard node.