Search code examples
mongodbkuberneteskubernetes-helmbitnami

Helm upgrade of MongoDB having a Primary-Secondary-Arbiter architecture, is there downtime?


I am thinking of setting up a bitnami mongodb replicaset in K8s, as explained here.

However, as a note they mention this while upgrading:

Note: An update takes your MongoDB replicaset offline if the Arbiter is enabled and the number of MongoDB replicas is two. Helm applies updates to the statefulsets for the MongoDB instance and the Arbiter at the same time so you loose two out of three quorum votes.

I am not sure what does it actually mean "taking the replicaset offline":

  1. Is it that the whole mongo service goes offline/down and therefore there is downtime on the service when performing helm upgrades?

  2. Is it that, while performing the upgrade, the replicaset will have only one mongodb server working, while both, the other mongo db server and arbiter, are offline and being upgraded?. In this case, it will not imply downtime, just that momentarily, there is just one server available (instead of two), so similar to a standalone setup.


Solution

  • Bitnami developer here

    Is it that, while performing the upgrade, the replicaset will have only one mongodb server working, while both, the other mongo db server and arbiter, are offline and being upgraded?

    That will depend on how many replicas you have. If you install the chart with 2 replicas + 1 arbiter, yes it means that. However, if you install the chart with 4 replicas + 1 arbiter, you'll have only 1 replica and the arbiter being restarted simultaneously, having the other 3 replicas up.

    In this case, it will not imply downtime, just that momentarily, there is just one server available (instead of two), so similar to a standalone setup.

    As it's mentioned in the previous response, it does imply a small downtime indeed if the minimum quorum of alive replicas it's not meet.