NServiceBus:使用 NServiceBus 分发器的优点和缺点
我正在考虑使用网络负载平衡器来平衡订阅者实例之间的消息负载,而不是使用 NServiceBus 分发器(据我所知,它基本上只是一个软件负载平衡器)。每个订阅者实例都会有一个同名的队列,用于将消息传递到其中,并且会有一个在订阅者之间循环的虚拟 IP。发布者只会知道虚拟 IP 和队列名称。
以下是我对这样做的优点和缺点的理解:
- 优点
- 无需安装NServiceBus Distributor
- 当我们进行扩展时,少了一件需要管理/更新的事情(我们已经使用 F5 来平衡这些机器的负载,我们的数据中心采购人员对此了如指掌)
- 减少一个故障点(是的,NLB 可能会失败,但让我们面对现实吧,F5 将比在 Windows 上运行的 NServiceBus Distributor 稳定得多)
- 无需集群服务器即可拥有集群 MSMQ。 2 台服务器比仅向 F5 添加另一个 VIP 贵得多。
- 缺点
- NServiceBus 分发器允许您更轻松地查看积压的消息,因为您可以监视分发器上的单个队列。这可以让您轻松了解何时应该添加更多工作节点。
- NServiceBus 分配器在控制工作线程数量等方面更加智能。与 NLB 相比,NServiceBus 分配器可以为您提供更多控制? (不确定这个)
我准确地捕捉到了这一点吗?我知道建议使用 NServiceBus Distributor,并且在反对该建议之前我想了解更多原因。
I am considering using a Network Load Balancer to load balance messages between my subscriber instances, instead of using the NServiceBus distributor (which is basically just a software load-balancer from what I can tell). Each subscriber instance will have a queue of the same name for messages to be delivered to, and there will be a virtual IP that round-robins between the subscribers. The publisher will only know about the virtual IP and queue name.
Here is what I understand as the pros and cons of doing this:
- PROS
- No need to install NServiceBus Distributor
- One less thing that would need to be managed/updated when we are scaling-out (we already use an F5 to load balance these machines, and our data center buys know it like the back of their hand)
- One less point of failure (yes, the NLB could fail, but let's face it, an F5 is going to be a lot more stable than NServiceBus Distributor running on Windows)
- No need to have a clustered server to have our clustered MSMQ. 2 servers is a lot more expensive than just adding another VIP to an F5.
- CONS
- The NServiceBus Distributor allows you to see the backlog of messages more easily since there is a single queue on the Distributor you can monitor. This makes it easy to know when you should add more worker nodes.
- The NServiceBus Distributor is smarter about controlling of number of worker threads, etc. Gives you more control than an NLB? (not sure about this one)
Have I captured this accurately? I know it is recommended to use the NServiceBus Distributor, and I would like to know more of why before I go against that recommendation.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您已经了解了一些要点,但主要区别之一是,由于分配器会自行加载,如果一台机器出现故障,其余的负载将在剩余的机器之间分配降低 SLA 对消息的影响。
Youve' got some of the main points down, but one of the main differences is that since the distributor holds on to load itself, if a machine were to go down, the rest of the load would be distributed between the remaining machines with a much lower SLA impact on the messages.