Currently, Link IoT Edge services are free of charge. However, you are charged for the messages and traffic consumed when you use Link IoT Edge services. This topic lists common questions about message and traffic statistics in Link IoT Edge and provides answers to them.

  • Messages in this topic refer to Message Queuing Telemetry Transport (MQTT) messages in Alibaba Cloud IoT Platform. For more information about message billing, see Messaging fees.
  • Traffic refers to data traffic, for example, 2G, 3G, 4G, or LTE traffic, consumed over carriers' networks.

How are MQTT heartbeat packets billed?

IoT Platform only counts MQTT heartbeat packets in traffic statistics, not in message statistics.

Size of an MQTT heartbeat packet Reporting frequency Daily average traffic Monthly average traffic
2 bytes Once every 120 seconds 2 × (24 × 60 × 60)/120 = 1440 bytes 1440 × 30 = 43,200 bytes

How is traffic consumed when I deploy an edge instance?

When you deploy an edge instance, traffic is mainly consumed during resource download. For example, when you download the driver, device and driver configurations, code of Function Compute functions, and Thing Specification Language (TSL) model definitions of products, HTTP traffic is consumed. After you complete the download, these resources do not consume more traffic.

The following table lists the sizes of official drivers provided by IoT Platform. The sizes of other edge instance resources vary based on actual situations.

Official driver Size
WebSocket driver in C 5 MB
Modbus driver in C 3.5 MB
Modbus driver in Python 49.9 KB
OPC UA driver in Python 17.7 KB

How is traffic consumed during sub-device property reporting, event reporting, and service call?

During sub-device property reporting, event reporting, and service call, the volume of the traffic consumed depends on the number of reported properties and events, property and event reporting frequency, and number of service calls.

When you develop a driver, pay attention to the following items:

  • Define an appropriate TSL model for sub-devices. For example, set the Identifier parameter to a value in an appropriate length for each property and merge or split property values appropriately.
  • Set an appropriate frequency for reporting properties and events based on business requirements.
  • Specify whether to report full or incremental property and event data based on business requirements.
  • Make sure that the Identifier parameter is defined in the IoT Platform console for each property to be reported. For more information about how to define a property in the IoT Platform console, see Define features.
  • Determine whether a long property value can be compressed and specify an appropriate encoding method, for example, Base64 or hexdump, to encode the value.

The traffic consumed for sub-device property reporting, event reporting, and service call can be calculated using the following methods:

  • Property reporting
    Request: /sys/$your_ProductKey/$your_DeviceName/thing/event/property/post {"id":"1945","version":"1.0","method":"thing.event.property.post","params":{"int32_rw":{"time":1565700807453,"value":0},"int32_r":{"time":1565700807453,"value":0},"float_rw":{"time":1565700807453,"value":0},"float_r":{"time":1565700807453,"value":0},"double_rw":{"time":1565700807453,"value":0},"double_r":{"time":1565700807453,"value":0},"enum_rw":{"time":1565700807453,"value":0},"enum_r":{"time":1565700807453,"value":0},"bool_rw":{"time":1565700807453,"value":0},"bool_r":{"time":1565700807453,"value":0},"string_rw":{"time":1565700807453,"value":""},"string_r":{"time":1565700807453,"value":"MlRVZq"},"date_rw":{"time":1565700807453,"value":""},"date_r":{"time":1565700807453,"value":"1565700807457"}}}
    
    Response: /sys/$your_ProductKey/$your_DeviceName/thing/event/property/post_reply
    {"code":200,"data":{"date_rw":"6311:tsl parse: date type must be a string of long(UTC ms) -> date_rw"},"id":"1945","message":"success","method":"thing.event.property.post","version":"1.0"}
  • Event reporting:
    Request: /sys/$your_ProductKey/$your_DeviceName/thing/event/event_int32/post
    {"params":{"time":1565700809121,"value":{"int32_rw":0}},"id":"1955","version":"1.0","method":"thing.event.event_int32.post"}
    
    Response: /sys/$your_ProductKey/$your_DeviceName/thing/event/event_int32/post_reply
    {"code":200,"data":{},"id":"1955","message":"success","method":"thing.event.event_int32.post","version":"1.0"}
  • Service call
    Request: /sys/$your_ProductKey/$your_DeviceName/thing/service/property/set
    {"method":"thing.service.property.set","id":"1115850974","params":{"string_rw":"hello world"},"version":"1.0.0"}
    
    Response: /sys/$your_ProductKey/$your_DeviceName/thing/service/property/set_reply
    {"id":"1115850974","code":200,"data":{}}

How is traffic consumed by the CloudMonitor service?

By default, the CloudMonitor service is disabled. You can enable it in the IoT Platform console as required. For more information about how to enable it, see Monitor resources. After you enable the CloudMonitor service for an edge instance in the IoT Platform console, monitoring information is uploaded to the IoT Platform console through HTTP or HTTPS. During the upload, traffic is consumed but MQTT messages are not generated.

The CloudMonitor service consumes much traffic. We recommend that you enable the CloudMonitor service over a Wi-Fi or cabled network.

Monitoring item HTTP packet size of a single monitoring item Reporting frequency Daily average traffic Monthly average traffic
Host monitoring 12.04 KB Once every 15 seconds 12.04 × (60 × 60 × 24)/15 = 69,350.4 KB ≈ 70 MB 70 × 30 = 2,100 MB
Scene orchestration (four monitoring items) 300 bytes Once every 60 seconds 4 × 300 × (60 × 60 × 24)/60 = 1,728,000 bytes = 1,728 KB 1,728 × 30 = 51,840 KB ≈ 52 MB
Edge application (four monitoring items) 300 bytes Once every 60 seconds 4 × 300 × (60 × 60 × 24)/60 = 1,728,000 bytes = 1,728 KB 1,728 × 30 = 51,840 KB ≈ 52 MB
Driver (four monitoring items) 300 bytes Once every 60 seconds 4 × 300 × (60 × 60 × 24)/60 = 1,728,000 bytes = 1,728 KB 1,728 × 30 = 51,840 KB ≈ 52 MB
Streaming data (four monitoring items) 300 bytes Once every 60 seconds 4 × 300 × (60 × 60 × 24)/60 = 1,728,000 bytes = 1,728 KB 1,728 × 30 = 51,840 KB ≈ 52 MB

How is traffic consumed during remote access?

By default, the remote access feature is disabled. You can enable this feature in the IoT Platform console as required. After you enable the remote access feature, about 3.5 MB traffic is consumed for heartbeat maintenance every month. MQTT messages are not generated during remote access.

When you use the remote access feature to perform operations, for example, run shell commands and upload or download files, on a remote console, traffic is also consumed. We recommend that you use the remote access feature over a Wi-Fi or cabled network.

Size of a WebSocket packet Reporting frequency Daily average traffic Monthly average traffic
ping-pong 20 bytes Once every 15 seconds 20 × (24 × 60 × 60)/15 = 115,200 bytes 115,200 × 30 = 3,456,000 bytes ≈ 3.5 MB

How is traffic consumed when I use Log Service?

By default, Log Service is disabled. You can enable Log Service for an edge instance in the IoT Platform console as required. After you enable Log Service, traffic is consumed for uploading log files through HTTP. The traffic volume is related to the log level, log recording frequency, and log content length. We recommend that you use Log Service over a Wi-Fi or cabled network.

MQTT messages are not generated when you use Log Service.