MongoDB 的 Helm 升级具有 Primary-Secondary-Arbiter 架构,是否有停机时间?

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

我正在考虑在 K8s 中设置一个 bitnami mongodb 复制集,正如所解释的 here

但是,请注意,他们在升级时提到了这一点:

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.

我不确定“使副本集离线”到底是什么意思:

  1. 是否整个 mongo 服务运行 offline/down 因此在执行 helm 升级时服务停机?

  2. 是不是在执行升级时,副本集将只有一个 mongodb 服务器在工作,而另一个 mongodb 服务器和仲裁器都在工作离线并正在升级?在这种情况下,这并不意味着停机,只是暂时只有一台服务器可用(而不是两台),与独立设置非常相似。

我不知道 Helm 是什么,它做什么,也不知道它为什么一次关闭两个节点,但是:

I 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.

独立的在启动时接受写入。副本集节点仅当它是主节点时才接受写入,并且要拥有主节点,大多数节点必须处于运行状态。因此,如果副本集的三个节点中只有一个 up,则不可能有主节点,并且没有节点会接受写入。

在三个节点中的一个可用的情况下,如果此节点是数据承载的,您仍然可以使用允许读取的辅助读取首选项(主要首选或次要或次要首选)发出读取,但主要读取将不起作用并且写入无效。

这里是 Bitnami 开发者

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?

这将取决于您拥有多少副本。如果您使用 2 个副本 + 1 个仲裁器安装图表,是的,这意味着。但是,如果您安装具有 4 个副本 + 1 个仲裁程序的图表,您将只有 1 个副本和同时重启的仲裁程序,同时启动其他 3 个副本。

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.

正如在之前的回复中提到的,如果不满足活动副本的最小法定人数,确实意味着停机时间很短。