Replication seems to be a lot simpler than sharding, unless I am missing the benefits of what sharding is actually trying to achieve. Don\'t they both provide horizontal sca
Just to put this somewhere...
The most basic way to run mongo is as standalone server.
mongodFor this picture, I didn't include the "client". Check the next one.
The initialization of the replica set is represented in the red border box.
mongos instead of mongod. This is a router for queries from the client.Obvious: The trade-off is a more complex architecture. Novelty: configuration server (again, a different config file).
There is much more to add, but apart from the words the pictures hold much the same.
Even mongoDB recommends to study your case carefully before going sharding. Vertical scaling (vs) is probably a good idea at least once before horizontal scaling (hs).
vs is done upgrading hardware (cpu, ram, etc). hs is needs more computers (but could be cheap computers).