Azure IoT 中心定价信息Azure IoT Hub pricing information

Azure IoT 中心定价概述了 IoT 中心的不同 SKU 和定价。Azure IoT Hub pricing provides the general information on different SKUs and pricing for IoT Hub. 本文还详述了 IoT 中心如何按消息对各种 IoT 中心功能计费。This article contains additional details on how the various IoT Hub functionalities are metered as messages by IoT Hub.

备注

本文中提到的某些功能(例如云到设备消息传递、设备孪生、设备管理)仅在 IoT 中心的标准层中提供。Some of the features mentioned in this article, like cloud-to-device messaging, device twins, and device management, are only available in the standard tier of IoT hub. 有关基本和标准 IoT 中心层的详细信息,请参阅如何选择合适的 IoT 中心层For more information about the basic and standard IoT Hub tiers, see How to choose the right IoT Hub tier.

每个操作的费用Charges per operation

OperationOperation 计费信息Billing information
标识注册表操作Identity registry operations
(创建、检索、列表、更新、删除)(create, retrieve, list, update, delete)
不收费。Not charged.
设备到云的消息Device-to-cloud messages 成功发送的消息以流入 IoT 中心的 4KB 区块大小为单位进行收费。Successfully sent messages are charged in 4-KB chunks on ingress into IoT Hub. 例如,1 条 6KB 的消息按 2 条消息收费。For example, a 6-KB message is charged 2 messages.
云到设备的消息Cloud-to-device messages 成功发送的消息按 4KB 区块大小为单位收费,例如,1 条 6KB 的消息按 2 条消息收费。Successfully sent messages are charged in 4-KB chunks, for example a 6-KB message is charged 2 messages.
文件上传File uploads 向 Azure 存储传输文件时,不通过 IoT 中心计费。File transfer to Azure Storage is not metered by IoT Hub. 文件传输时的启动消息和完成消息按 4KB 增量数计费。File transfer initiation and completion messages are charged as messaged metered in 4-KB increments. 例如,传输一个 10 MB 的文件时,会在 Azure 存储费用的基础上收取两条消息的费用。For example, transferring a 10-MB file is charged as two messages in addition to the Azure Storage cost.
直接方法Direct methods 成功的方法请求按 4-KB 区块大小为单位收费,响应作为附加消息以 4-KB 区块大小为单位收费。Successful method requests are charged in 4-KB chunks, and responses are charged in 4-KB chunks as additional messages. 向已断开连接的设备发出的请求被视作消息,以 4KB 块大小为单位收费。Requests to disconnected devices are charged as messages in 4-KB chunks. 例如,正文为 4-KB 的方法产生的来自设备的响应若没有正文,则按 2 条消息收费。For example, a method with a 4-KB body that results in a response with no body from the device is charged as two messages. 而正文为 6KB 的方法产生的来自设备的响应若为 1KB,则按 2 条请求消息收费,另加一条响应的消息费用。A method with a 6-KB body that results in a 1-KB response from the device is charged as two messages for the request plus another message for the response.
设备和模块孪生读取Device and module twin reads 如果孪生从设备或模块和解决方案后端进行读取,则将其作为消息以 512 字节块大小为单位收费。Twin reads from the device or module and from the solution back end are charged as messages in 512-byte chunks. 例如,读取 6 KB 的孪生按 12 条消息收费。For example, reading a 6-KB twin is charged as 12 messages.
设备和模块孪生更新(标记和属性)Device and module twin updates (tags and properties) 如果孪生从设备或模块和解决方案后端进行更新,则将其作为消息以 512 字节块大小为单位收费。Twin updates from the device or module and from the solution back end are charged as messages in 512-byte chunks. 例如,读取 6 KB 的孪生按 12 条消息收费。For example, reading a 6-KB twin is charged as 12 messages.
设备和模块孪生查询Device and module twin queries 查询被视作消息,根据结果大小以 512 字节块大小为单位收费。Queries are charged as messages depending on the result size in 512-byte chunks.
作业操作Jobs operations
(创建、更新、列表、删除)(create, update, list, delete)
不收费。Not charged.
作业的每设备操作数Jobs per-device operations 作业操作(例如孪生更新和方法)正常收费。Jobs operations (such as twin updates, and methods) are charged as normal. 例如,如果一个作业生成 1000 个方法调用以及 1KB 的请求和正文为空的响应,则按 1000 条消息收费。For example, a job resulting in 1000 method calls with 1-KB requests and empty-body responses is charged 1000 messages.
连接保持的消息Keep-alive messages 使用 AMQP 或 MQTT 协议时,为建立连接而交换的消息和协商中交换的消息不收费。When using AMQP or MQTT protocols, messages exchanged to establish the connection and messages exchanged in the negotiation are not charged.

备注

所有大小均按以字节为单位的有效负载大小进行计算(忽略协议组帧)。All sizes are computed considering the payload size in bytes (protocol framing is ignored). 对于具有属性和正文的消息,大小以无关协议的方式计算。For messages, which have properties and body, the size is computed in a protocol-agnostic way. 有关详细信息,请参阅 IoT 中心消息格式For more information, see IoT Hub message format.

示例 #1Example #1

某个设备每分钟将一条 1KB 的设备到云的消息发送到 IoT 中心,该消息随后由 Azure 流分析读取。A device sends one 1-KB device-to-cloud message per minute to IoT Hub, which is then read by Azure Stream Analytics. 解决方案后端每 10 分钟调用设备上的 1 个方法(有效负载为 512 字节),以便触发特定操作。The solution back end invokes a method (with a 512-byte payload) on the device every 10 minutes to trigger a specific action. 设备以 200 字节大小的结果响应方法。The device responds to the method with a result of 200 bytes.

设备使用:The device consumes:

  • 一条消息 * 60 分钟 * 24 个小时 = 每天 1440 条消息用于设备到云消息传递。One message * 60 minutes * 24 hours = 1440 messages per day for the device-to-cloud messages.
  • 一请求加一响应 * 每小时 6 次 * 24 小时 = 288 条消息用于方法。Two request plus response * 6 times per hour * 24 hours = 288 messages for the methods.

此计算得出每天共 1728 条消息。This calculation gives a total of 1728 messages per day.

示例 2Example #2

某设备每小时发送 1 条 100KB 的设备到云的消息。A device sends one 100-KB device-to-cloud message every hour. 它还每隔 4 小时更新一次有效负载为 1KB 的设备孪生。It also updates its device twin with 1-KB payloads every four hours. 解决方案后端每天读取一次 14KB 的设备孪生并使用 512 字节的有效负载更新一次,以更改配置。The solution back end, once per day, reads the 14-KB device twin and updates it with 512-byte payloads to change configurations.

设备使用:The device consumes:

  • 25 (100KB/4KB) 条消息 * 24 小时用于设备到云消息传递。25 (100 KB / 4 KB) messages * 24 hours for device-to-cloud messages.
  • 两条消息 (1KB/0.5KB) * 每天 6 次用于设备孪生更新。Two messages (1 KB / 0.5 KB) * six times per day for device twin updates.

此计算得出每天共 612 条消息。This calculation gives a total of 612 messages per day.

解决方案后端使用 28 条消息 (14KB/0.5KB) 读取设备孪生,并使用 1 条消息进行更新,总计 29 条消息。The solution back end consumes 28 messages (14 KB / 0.5 KB) to read the device twin, plus one message to update it, for a total of 29 messages.

设备和解决方案后端每天总共使用 641 条消息。In total, the device and the solution back end consume 641 messages per day.