In this section, we will explore different failure types and how we can recover in a sharded environment.
Sharding recovery
Mongos
mongos is a relatively lightweight process that holds no state. In the case that the process fails we can just restart it or spin up a new process in a different server. It's recommended that mongos processes co-locate in the same server as our application and so it makes sense to connect from our application using the set of mongos servers that we have co-located in our application servers to ensure high availability of mongos processes.