简体   繁体   English

Azure Service Fabric和消息队列

[英]Azure Service Fabric and Message Queues

Now with Azure Service fabric, would there be a use-case for also using a separate queue solution such as Windows Service Bus? 现在有了Azure Service Fabric,是否会有用例来使用单独的队列解决方案,例如Windows Service Bus? The downsides would probably be a new single point of failure, but are there upsides? 不利之处可能是新的单点故障,但是有不利之处吗? Queues can add some buffering, but on the other hand, Service Fabric should be able to scale really well and offer stateful capabilities, so no queue buffers should be needed? 队列可以添加一些缓冲,但是另一方面,Service Fabric应该能够真正很好地扩展并提供有状态功能,因此不需要队列缓冲区吗?

Sure, the upside is that services like Azure Service Bus and Azure Storage Queues offer features that are not included out-of-the-box in Service Fabric. 可以肯定的是,Azure Service Bus和Azure Storage Queues之类的服务提供的功能并未包含在Service Fabric中。 So the question to ask yourself is: do you add an external service dependency to get that functionality, or do you stay self-contained by building it yourself on Service Fabric? 因此,要问自己的问题是:是否添加外部服务依赖项以获得该功能,还是通过在Service Fabric上自行构建来保持独立性? A self-contained application on Service Fabric is good, but re-inventing existing functionality is bad, so you have to decide where the most value is for you and lean in that direction. 在Service Fabric上自包含的应用程序是好的,但是重新发明现有的功能是不好的,因此您必须确定对您来说最大的价值并朝那个方向倾斜。

For example, think about.. 例如,考虑一下。

  • Portability. 可移植性。 An application that is self contained on Service Fabric can be hosted wherever Service Fabric can run, which is pretty much anywhere (Azure, other public clouds, your own machines or data center, etc.). Service Fabric自身包含的应用程序可以在Service Fabric可以运行的任何地方托管,几乎可以在任何地方(Azure,其他公共云,您自己的机器或数据中心等)运行。
  • No external dependencies means fewer points of failure, a single toolset, and a unified development, deployment, upgrade, and maintenance process. 没有外部依赖关系意味着更少的故障点,单个工具集以及统一的开发,部署,升级和维护过程。

On the other hand.. 另一方面..

  • Services like Service Bus offer a rich set of features . 诸如服务总线之类的服务提供了丰富的功能集 Is it worth spending the time building and maintaining the features you need yourself on Service Fabric? 花时间在Service Fabric上构建和维护自己需要的功能是否值得?

Good question! 好问题! I'm noodling around this as well. 我也在这周围打no。 In my case I'm using a RabbitMQ cluster for queuing. 就我而言,我使用RabbitMQ集群进行排队。 I wanted to avoid it and was hoping to have Stateful services using Reliable Queues. 我想避免这种情况,并希望使用可靠队列来提供有状态服务。 I exposed a method to add the message to the service and use the RunAsync method to dequeue the messages as they arrive. 我公开了一种将消息添加到服务的方法,并使用RunAsync方法在消息到达时使消息出队。 I'm not impressed with the performance using this approach, compared to a stateless service connecting to RabbitMQ. 与连接到RabbitMQ的无状态服务相比,使用这种方法的性能没有让我印象深刻。 But before I give up, I'm planning to partition the Stateful service across a 5 nodes and see if there are any performance improvements, using the Stateful services a queue consuming workers. 但是在放弃之前,我打算将Stateful服务划分为5个节点,并使用Stateful服务队列消耗型工人,看看是否有任何性能改进。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM