服务总线高级和标准消息传送层Service Bus Premium and Standard messaging tiers

服务总线消息传送(包括队列和主题等实体)将企业消息传送功能与丰富的云规模发布-订阅语义结合在一起。Service Bus Messaging, which includes entities such as queues and topics, combines enterprise messaging capabilities with rich publish-subscribe semantics at cloud scale. 对于许多复杂的云解决方案,服务总线消息传送用作通信中枢。Service Bus Messaging is used as the communication backbone for many sophisticated cloud solutions.

服务总线消息传送的 高级 层处理有关任务关键应用程序的规模、性能和可用性的常见客户请求。The Premium tier of Service Bus Messaging addresses common customer requests around scale, performance, and availability for mission-critical applications. 高级层建议用于生产方案。The Premium tier is recommended for production scenarios. 虽然功能集几乎完全相同,但这两个层的服务总线消息传送旨在满足不同的使用情形。Although the feature sets are nearly identical, these two tiers of Service Bus Messaging are designed to serve different use cases.

下表突出显示了部分高层差异。Some high-level differences are highlighted in the following table.

高级Premium 标准Standard
高吞吐量High throughput 可变吞吐量Variable throughput
可预测性能Predictable performance 可变滞后时间Variable latency
固定定价Fixed pricing 标准预付费套餐可变定价Standard Pay-in-Advance Offer variable pricing
增加和减少工作负荷的能力Ability to scale workload up and down 空值N/A
消息大小最大为 1 MB。Message size up to 1 MB. 此上限将来可能会提高。This limit may be raised in the future. 有关服务的最新重要更新,请参阅 Azure 上的消息传送博客For latest important updates to the service, see Messaging on Azure blog. 消息大小最大为 256 KBMessage size up to 256 KB

服务总线高级消息传送 在 CPU 和内存级别提供资源隔离,以便每个客户工作负荷以隔离方式运行。Service Bus Premium Messaging provides resource isolation at the CPU and memory level so that each customer workload runs in isolation. 此资源容器称为 消息传送单元This resource container is called a messaging unit . 每个高级命名空间至少会分配一个消息传送单元。Each premium namespace is allocated at least one messaging unit. 可以为每个服务总线高级命名空间购买 1、2、4 或 8 个消息传送单元。You can purchase 1, 2, 4 or 8 messaging units for each Service Bus Premium namespace. 单一工作负荷或实体可以跨多个消息传送单元,可以随意更改消息传送单元数。A single workload or entity can span multiple messaging units and the number of messaging units can be changed at will. 这会为基于服务总线的解决方案提供可预测和稳定的性能。The result is predictable and repeatable performance for your Service Bus-based solution.

此性能不仅更易于预测和实现,而且速度更快。Not only is this performance more predictable and available, but it is also faster. 服务总线高级消息传送以在 Azure 事件中心引入的存储引擎为基础。Service Bus Premium Messaging builds on the storage engine introduced in Azure Event Hubs. 使用高级消息传送,峰值性能比使用标准层快得多。With Premium Messaging, peak performance is much faster than with the Standard tier.

高级消息传送技术差异Premium Messaging technical differences

以下部分介绍高级和标准消息传送层之间的一些差异。The following sections discuss a few differences between Premium and Standard messaging tiers.

分区队列和主题Partitioned queues and topics

高级消息传送不支持分区队列和主题。Partitioned queues and topics aren't supported in Premium Messaging. 有关分区的详细信息,请参阅 分区的队列和主题For more information about partitioning, see Partitioned queues and topics.

快速实体Express entities

由于高级消息传送在一个隔离的运行时环境中运行,因此高级命名空间中不支持快速实体。Because Premium messaging runs in an isolated run-time environment, express entities aren't supported in Premium namespaces. 有关快速功能的详细信息,请参阅 QueueDescription.EnableExpress 属性。For more information about the express feature, see the QueueDescription.EnableExpress property.

如果有在标准传送下运行的代码并且希望将其移植到高级层,请确保将 EnableExpress 属性设置为 false (默认值)。If you have code running under Standard messaging and want to port it to the Premium tier, make sure the EnableExpress property is set to false (the default value).

高级消息传送资源使用情况Premium Messaging resource usage

通常,对实体进行的任何操作都可能导致 CPU 和内存使用率增高。In general, any operation on an entity may cause CPU and memory usage. 下面是一些这样的操作:Here are some of these operations:

  • 管理操作,例如对队列、主题和订阅的 CRUD(创建、检索、更新和删除)操作。Management operations such as CRUD (Create, Retrieve, Update, and Delete) operations on queues, topics, and subscriptions.
  • 运行时操作(发送和接收消息)Runtime operations (send and receive messages)
  • 监视操作和警报Monitoring operations and alerts

但是,额外的 CPU 和内存使用量并不额外定价。The additional CPU And memory usage isn't priced additionally though. 对于“高级消息传送”层,消息单元有一个单价。For the Premium Messaging tier, there's a single price for the message unit.

由于以下原因,系统会跟踪并显示 CPU 和内存使用情况:The CPU and memory usage are tracked and displayed to you for the following reasons:

  • 让你透彻了解系统内部情况Provide transparency into the system internals
  • 让你了解所购资源的容量。Understand the capacity of resources purchased.
  • 让你通过容量计划来决定是进行纵向扩展还是缩减。Capacity planning that helps you decide to scale up/down.

消息传送单元 - 需要多少?Messaging unit - How many are needed?

预配 Azure 服务总线高级命名空间时,必须指定分配的消息传送单元数。When provisioning an Azure Service Bus Premium namespace, the number of messaging units allocated must be specified. 这些消息传送单元是分配给命名空间的专用资源。These messaging units are dedicated resources that are allocated to the namespace.

分配给服务总线高级命名空间的消息传送单元数可以 动态调整 ,将工作负荷的变化(增加或减少)因素考虑进去。The number of messaging units allocated to the Service Bus Premium namespace can be dynamically adjusted to factor in the change (increase or decrease) in workloads.

为体系结构确定消息传送单元数量时,需要考虑以下几个因素:There are a number of factors to take into consideration when deciding the number of messaging units for your architecture:

  • 从分配给命名空间的 1 个或 2 个消息传送单元开始。Start with * 1 or 2 messaging units _ allocated to your namespace.
  • 在命名空间的资源使用情况指标中研究 CPU 使用情况指标。Study the CPU usage metrics within the Resource usage metrics for your namespace.
    • 如果 CPU 使用率低于 20%,则可纵向缩减分配给命名空间的消息传送单元数 。If CPU usage is below 20% , you might be able to scale down the number of messaging units allocated to your namespace.
    • 如果 CPU 使用率超过 70%,则增加分配给命名空间的消息传送单元数将有益于应用程序 。If CPU usage is above 70% , your application will benefit from scaling up the number of messaging units allocated to your namespace.

备注

缩放分配给命名空间的资源的操作可以抢先进行,也可以被动进行。_ Scaling * of the resources allocated to the namespace can be either preemptive or reactive.

  • 抢先 :如果预期会有额外的工作负荷(考虑到季节性或趋势),可以在达到工作负荷限制之前向命名空间分配额外的消息传送单元。Preemptive : If additional workload is expected (due to seasonality or trends), you can proceed to allocate more messaging units to the namespace before the workloads hit.

  • 被动 :如果通过研究资源使用情况指标确定了额外的工作负荷,则可将额外的资源分配给命名空间来应对不断增长的需求。Reactive : If additional workloads are identified by studying the resource usage metrics, then additional resources can be allocated to the namespace to incorporate increasing demand.

服务总线的费用按小时计。The billing meters for Service Bus are hourly. 进行纵向扩展时,只需按额外资源的使用小时数付费。In the case of scaling up, you only pay for the additional resources for the hours that these were used.

高级消息传送入门Get started with Premium Messaging

高级消息传送很容易入门,其操作过程类似于标准消息传送。Getting started with Premium Messaging is straightforward and the process is similar to that of Standard Messaging. 一开始时,请在 Azure 门户创建命名空间Begin by creating a namespace in the Azure portal. 确保在“定价层”下选择“高级”。Make sure you select Premium under Pricing tier . 单击“查看完整的定价详细信息”以查看有关每个层级的详细信息。Click View full pricing details to see more information about each tier.

create-premium-namespace

也可以使用 Azure 资源管理器模板创建高级命名空间You can also create Premium namespaces using Azure Resource Manager templates.

后续步骤Next steps

若要了解有关服务总线消息传送的详细信息,请参阅以下链接:To learn more about Service Bus Messaging, see the following links: