Deploying a sharded cluster

In the following example, we are only using the configuration file option. If you are interested in the equivalent command-line options, see the tutorial on deploying a sharded cluster (https://docs.mongodb.com/manual/tutorial/deploy-shard-cluster/#sharding-deploy-sharded-cluster). Here is the list of servers that are used in this walkthrough:

  • ed will be configured as a config server as part of replica set config1
  • fred will host the sweetscomplete database and a shard from the purchases collection
  • zed will host a shard from the purchases collection

Here are the steps to follow:

  1. Deploy the config server replica set: Follow the same procedure that was outlined previously in the section on replication. The only ...

Get MongoDB 4 Quick Start Guide now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.