This is just a simple demo on how to create a MongoDB
Sharded Replica Set.
- 1 Shard Server
- 3 Sharded Replica Set Servers
- 9 Mongos Servers
This is an example of how MongoDB can be scaled horizontally across multiple servers.
- Creating all directories for
replicaset
andshard
server - Starts main shard server.
- Starts the replica shard servers
- Initializes all
replicaset
- Adds
replicaset
servers to shard server.
- Start 9 instances of a
mongos
server
- Start a simple
mongodb
replicaset
server - Initiate this replica set
After build and initialization of Shard Server you can run ./start.sh
to start the shard
server.