如何使用 NAS 与虚拟机实现 ActiveMQ
我们正在将 .NET 平台从使用 MSMQ 迁移到 ActiveMQ。我们每天通过它发送超过 3000 万条持久消息,因此吞吐量和容量对我们至关重要。我们的 MSMQ 相关应用程序的配置方式是首先写入本地/专用队列。然后我们有一个本地服务将这些消息路由到各自的远程队列进行处理。这确保了初始排队/写入的速度很快(是的,我们也可以使用异步排队),并且如果远程服务器不可用,消息也不会丢失。
我们原本打算对 ActiveMQ 使用相同的范例,但现在我们决定对大多数应用程序服务器使用带有 NAS 存储的虚拟机。这大大降低了每条消息的写入性能,因为它会发送到 NAS,我觉得我需要重新考虑我们的排队方法。我想知道在持续的高吞吐量需求下使用 ActiveMQ 的最佳实践是什么。我应该考虑使用专用队列服务器(不是虚拟机)吗?但这意味着应用程序的所有写入都直接通过网络进行。如何应对高可用性要求?
任何建议表示赞赏。
We're in the process of moving our .NET platform from using MSMQ to ActiveMQ. We pump 30+ million persistent messages through it a day, so throughput and capacity are critical to us. The way our MSMQ dependent applications are configured, is they write to local/private queues first. Then we have a local service that routes those messages to their respective remote queues for processing. This ensures the initial enqueue/write write is fast (yes, we can also use async enqueueing as well), and messages aren't lost if the remote servers are unavailable.
We were going to use the same paradigm for ActiveMQ, but now we've decided to move to using VM's with NAS storage for most of our application servers. This greatly reduces the write performance of each message since it's going to NAS, and I feel I need to rethink our approach to queueing. I'd like to know what is considered best practice for using ActiveMQ, with persistent, high throughput needs. Should I consider using dedicated queue servers (that aren't VM's)? But that would mean all writes from the application are going directly over the network. How do I deal with high availability requirements?
Any suggestions are appreciated.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您可以在代理网络中部署 ActiveMQ 实例,并且拓扑可以包括本地实例以及远程实例。我已经部署了包含 ActiveMQ 本地实例的拓扑,以便将消息保留在尽可能靠近发送者的位置,然后根据需求将消息转发到远程 ActiveMQ 实例。对于这种类型的拓扑,我建议将网络连接器配置为禁止转发来自所有目标的消息。即,您可能希望使用 exceptedDestinations 属性来缩小转发的消息数量,而不是公开允许转发所有目标的消息。
就 ActiveMQ 的高可用性而言,master/slave 配置正是为此而设计的。根据您的需求,它有三种口味。
希望有帮助。
布鲁斯
You can deploy ActiveMQ instances in a network of brokers and the topology can include local instances as well as remote instances. I have deployed topologies containing a local instance of ActiveMQ so that messages are persisted as close to the sender as possible and then the messages are forwarded to remote ActiveMQ instances based on demand. With this style of topology, I recommend configuring the network connector(s) to disallow forwarding messages from all destinations. I.e., instead of openly allowing the forwarding of messages for all destinations, you may want to narrow the number of messages forwarded using the excludedDestinations property.
As far as high availability with ActiveMQ, the master/slave configuration is designed for exactly this. It comes in three flavors depending on your needs.
Hope that helps.
Bruce