Another mapSet attribute affecting shard placement is the developmentMode
attribute. By default, this value is set to true
, meaning the deployment is in development mode. Development mode allows primary and replica shards to be placed on the same host. It also allows us to start all of our containers on the same host, be it our laptop, desktop, test system, or wherever. We cannot run these examples without the development mode as well as without at least two different host operating systems, whether they may be physical boxes or virtual.
When a deployment is not in development mode, two shards from the same partition cannot live on the same host, even if they are in different containers. With developmentMode="false"
, multiple containers on the same host will not contain any duplicate objects. The entire set of objects is unique because only one shard from each partition may live in a container on that host.
This is significant because a production environment should never...