RabbitMQ HA模式全部或完全差异?

发布于 2025-02-09 09:00:53 字数 544 浏览 2 评论 0 原文

我们有一个带有3个节点的群集,目前我们有以下HA(高可用性)镜像策略,如下所示:

“在此处输入图像说明”

  1. 看到我们指定 ha-params 2 ,这意味着其他两个节点的镜子,还是总共2个节点或3个节点?
  2. 这与以下我们刚刚指定所有的情况相同,因为只有3个节点?

We have a cluster with 3 nodes, we currently have the following HA (High Availability) mirror policy as shown below:

enter image description here

  1. Seeing as we specify the ha-params as 2, does this mean mirror to the 2 other nodes, or 2 nodes in total or the 3?
  2. Is this the same as the following where we just specify all, as there are only 3 nodes?

enter image description here

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

与他有关 2025-02-16 09:00:53

2 2 的计数值表示 2 replicas :1队列领导者和1个队列镜。换句话说: numberFqueeMirrors = numberOfnodes -1

挖掘更多详细信息:

A count value of 2 means 2 replicas: 1 queue leader and 1 queue mirror. In other words: NumberOfQueueMirrors = NumberOfNodes - 1.

to dig more details: https://www.rabbitmq.com/ha.html#mirroring-arguments

余生共白头 2025-02-16 09:00:53

深入研究更深入的了解,我可以看到指定 ha-params 作为 2 将意味着总共2个节点会被镜像,因此其中一个节点不会是!这与 all 一个都不一样,因为这与所有节点相吻合,这对我目前更有意义。

Delving deeper and with a bit more understanding I can see that specifying ha-params as 2 will mean that a total of 2 nodes will be mirrored, so one of the nodes wont be! It's no the same as the all one, as that would mirror to all nodes, which would make more sense to me currently.

简单爱 2025-02-16 09:00:53

使用 ha-mode 恰好 ha-params 作为 2 ,将在2个节点上启用镜像/复制在集群中(包括领导者)。如果在这种情况下添加了一个新节点,则仅在2个节点上继续复制。

另一方面,使用 ha-mode 作为所有,将在群集中的所有节点上启用镜像/复制。在这里,如果将新节点添加到群集中,则在新节点上也将开始复制。

您可以在此处阅读有关经典镜像队列的更多信息 - https> https:///wwwwww.rabbitmq。 com/doc/3.13/ha#镜像 - arguments

此外,经典镜像队列已在最新版本的RabbitMQ中弃用。一种现代的方法是使用法定人数 - https://wwww.rabbitmq.com/docs/quorumq.com/quorumquorumquorumquorum - 标题

With ha-mode as exactly and ha-params as 2, mirroring/replication will be enabled across 2 nodes in the cluster (including the leader). If a new node is added in this case, replication will continue to happen only on 2 nodes.

On the other hand, with ha-mode as all, mirroring/replication will be enabled across all the nodes in the cluster. Here, if a new node is added to the cluster, replication will also start happening on the new node.

You can read more about Classic Mirrored Queues here - https://www.rabbitmq.com/docs/3.13/ha#mirroring-arguments

Moreover, Classic Mirrored Queues have been deprecated in the latest version of RabbitMQ. A modern approach is to use Quorum Queues - https://www.rabbitmq.com/docs/quorum-queues

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文