Sharding Introduction Sharding is a method for storing data across multiple machines. Sharding , or horizontal scaling , by contrast, divides the data set and distributes the data over multiple servers, or shards . Each shard is an independent database, and collectively, the shards make up a single logical database. Sharding in MongoDB MongoDB supports sharding through the configuration of a sharded clusters . Components in Sharded Cluster : Shard Query Routers Config Servers Shards store the data. To provide high availability and data consistency, in a production sharded cluster, each shard is a replica set . Query Routers , or mongos instances, interface with client applications and direct operations to the appropriate shard or shards. The query router processes and targets operations to shards and then returns results to the clients. A sharded cluster can contain more than one query router to divide the client request load. A client sends ...
“A blog about full-stack javascript discussions and solutions ”