问题描述
我已经使用join_cluster命令创建了由三个RabbitMQ节点组成的集群。
I have created a cluster consists of three RabbitMQ nodes using join_cluster command.
ie
rabbitmqctl –n rabbit2@MYPC1 join_cluster rabbit2@MYPC1
(当前群集在单台计算机上运行)
(currently the cluster runs on a single computer)
问题:
在中说
- 我配置了什么?
- 我该如何配置?知道吗?
- 如何进行更改?
- 在Active Active和amp; amp;之间有很大的性能折衷吗主动被动?
- 与主动/主动交互的最佳实践是什么?
即安装负载平衡器?会轮循的apache - 与主动/被动交互的最佳实践是什么?
如果我仅与主动交互-这是单点f失败
- What did I configure?
- How do I know?
- How can it be changed?
- Is there a big performance trade off between Active Active & Active Passive?
- What is the best practice to interact with active/active?
i.e. install a load balancer? apache that will round robin - What is the best practice to interact with active/passive?
if I interact with only the active - this is a single point f failure
谢谢。
推荐答案
我一直使用RabbitMQ对可用性选项进行了一些研究,尽管我还很新,但是我将尝试以我所拥有的知识来回答您的问题。请理解,这些答案并非旨在全面。
I have been doing some research into availability options with RabbitMQ and while I am still fairly new, I'll attempt to answer your questions with the knowledge I do have. Please understand that these answers are not intended to be comprehensive.
在回答问题和答案之前,我认为应该指出使用主动/主动术语在单台计算机上运行的群集的上下文中,主动/被动和主动/被动并不真正适用。主动/主动和主动/被动是用于描述高可用性集群的术语,在该集群中,您拥有一个以上的逻辑服务器(如果是多个RabbitMQ集群),共享/冗余存储,网络功能,电源等系统。 / p>
Before getting to the questions and answers, I think it's worth pointing out that I think using the terms Active/Active and Active/Passive in the context of a cluster running on a single computer does not really apply. Active/Active and Active/Passive are typically terms used to describe highly available clusters where you have a system of more than one logical server (in your case, multiple RabbitMQ clusters), shared/redundant storage, network capabilities, power, etc.
- 我配置了什么?
群集中的节点或队列的镜像没有任何负载平衡两者都不存在,这意味着您没有高度可用的群集。 - 我怎么知道?
RabbitMQ不提供任何连接管理因此,发生故障的节点的流量将不会自动传递到其他节点,这对于主动/主动群集是必需的。没有队列镜像,您的群集中就没有完全冗余的节点,而主动/被动节点是必需的。 - 如何更改它?
即使您实施了负载平衡和/或队列镜像,也缺少提供高可用性RabbitMQ集群的许多要求。首先,对于RabbitMQ群集,您只有一个逻辑代理(对于HA群集,至少需要两个逻辑代理)。 - Active与Active之间是否需要进行较大的性能折衷&主动被动式吗?
我认为当您开始引入数据复制和/或冗余时,您会开始看到性能下降,这会同时影响主动/主动式和主动/被动式。如果使用同步数据复制,则与异步复制数据相比,您将看到更大的性能影响。还有很多事情要做,但是对我来说,使用Active / Active可能会带来更大的性能损失,但这在很大程度上取决于所有组件协同工作的速度。在主动/被动模式下,您可能会在服务器之间使用异步复制,因此性能可能会更好,但是在故障转移的情况下,您需要等待复制完成才能切换到辅助服务器。 - 与主动/主动交互的最佳实践是什么?即安装负载均衡器?会循环运行的Apache
RabbitMQ建议使用负载平衡器,这样您就不必将群集中节点的详细信息泄漏给客户端。 - 与主动/被动互动的最佳实践是什么?如果我仅与主动服务器交互-这是一个单点故障
这是一个故障点,但是通过主动/被动,您可以实施故障策略以重试下一个可用服务器或全部剩余的服务器。使用这些策略,您可以建立一种方案,在这种情况下,群集的功能只会在发生故障转移时降级,而不会完全不可用。另外,您可以与被动方进行交互,但是交互的类型可能非常不同(即只读访问),因为在被动方上可用的资源可能较少,并且数据复制可能会延迟。
- What did I configure?
Without any load balancing for the nodes in your cluster or queue mirroring you have neither, meaning you do not have a highly available cluster. - How do I know?
RabbitMQ does not provide any connection management so traffic with a failed node will not automatically be passed on to a different node, which is required for an active/active cluster. Without queue mirroring you do not have fully redundant nodes in your cluster, which is required for active/passive. - How can it be changed?
Even if you implement load balancing and/or queue mirroring you are missing a number of requirements to offer a highly-available RabbitMQ cluster. Primarily, with a RabbitMQ cluster you only have a single logical broker (at least two are required for an HA cluster). - Is there a big performance trade off between Active Active & Active Passive?
I think you will start seeing performance penalties as you start introducing data replication and/or redundancy, which would affect both Active/Active and Active/Passive. If you are using synchronous data replication then you will see a bigger performance hit than if you replicate data asynchronously. There's a lot more to it, but to me this feels like there may be a bigger performance hit by using Active/Active but this depends heavily on how fast all of the pieces are working together. In Active/Passive where you may be using asynchronous replication across servers your performance may appear better but in a failover situation you would need to wait for that replication to complete before you can switch to your secondary server. - What is the best practice to interact with active/active? i.e. install a load balancer? apache that will round robin
RabbitMQ recommends using a load balancer so that you do not have to leak details about the nodes in your cluster to the clients. - What is the best practice to interact with active/passive? if I interact with only the active - this is a single point of failure
It is a point of failure but with Active/Passive you can implement a failure strategy to retry the next available server or all remaining servers. With these strategies in place you can establish a scenario where the capabilities of your cluster are merely degraded while a failover is happening instead of totally unavailable. Also, you can interact with the passive side but the types of interactions may be very different (i.e. read-only access) since there may be fewer resources available on the passive side and there may be delays in data replication.
以下是用于收集此信息的参考:
Here are some references used to gather this information:
- High-Availability Cluster on Wikipedia
- Clustering with RabbitMQ
- Highly Available Queues in a RabbitMQ Cluster
- High Availability in RabbitMQ
这篇关于我的RabbitMQ集群是“主动”还是“主动”?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!