IoT cloud storage models: where data lands
Short answer: Azure IoT Hub gives three device-to-cloud routes, and each stores data differently: messages are kept up to seven days, reported properties are kept in the device twin and can be queried, and file uploads go to an Azure Storage account the user provides. A survey chapter describes three communication models, direct, device to cloud, and through an edge gateway, and says the gateway model enables design decisions such as data aggregation at the gateway.
Where IoT device data is kept in the cloud: Azure IoT Hub's three device-to-cloud routes, how long messages are kept, and the communication models behind them.
This article covers the three Azure IoT Hub routes and where each keeps data, how long messages are kept, the three communication models from the survey, and what the gateway model changes It does not cover prices, quotas, or storage tiers, the AWS and Google Cloud equivalents, or how to size a storage account
An IoT device sends its readings to the cloud by one route or another. This guide covers Microsoft’s device-to-cloud guidance for Azure IoT Hub and a survey chapter on communication models. For the layers around the cloud, see the IoT architecture guide. For a store built for timestamped readings, see the time series database guide.
Three communication models
The survey chapter, “IoT Standardization: The Road Ahead” (arXiv 1808.09390, an IntechOpen book), lists three models for how devices reach an application server:
- Direct communication between devices (D-D), with no intermediary.
- Device to an application server in the cloud (D-C).
- Through an edge gateway (D-E-C), where “the end devices use a local gateway as a conduit to connect to the application server in the cloud.”
The chapter says the cloud model requires that “the end devices have to be IP enabled and should use generic standard protocols to remain interoperable.” On the gateway model, it says it “enables design decisions like data aggregation at the gateway and traffic optimization while communicating with the cloud with an extra cost due to additional infrastructure at the user premise along with the cloud service.”
Three routes in Azure IoT Hub
Microsoft’s guidance lists three ways a device sends data to IoT Hub:
- Device-to-cloud messages. The page says they are “Temporarily stored by IoT Hub, up to seven days. Only sequential reading.”
- Reported properties in the device twin. The page says they are “Stored by IoT Hub in the device twin. Retrievable using the IoT Hub query language.”
- File uploads. The page says they are “Stored in user-provided Azure Storage account.”
The page also rates frequency: “High” for messages, “Medium” for reported properties and “Low” for file uploads. It says that “since device-to-cloud messages enable higher throughput than device twin updates, it’s sometimes desirable to avoid updating the device twin for every device-to-cloud message.”
What the table means for storage
Read against the table, the routes split by what the data is for:
- A reading that must be kept longer than a week would need a copy outside the message path. That is our reading of the table, not the page’s wording, because messages are kept up to seven days.
- A value that an application looks up by query fits the device twin, since the page describes a query option for device twin properties and says messages are read only in sequence.
- File uploads go to an Azure Storage account the user provides.
Where the sources stop
The Azure page, as read for this guide, gives no prices. It states size limits of 256 KB per message and 32 KB for reported properties. The survey chapter describes models in general, names two products as examples, and does not discuss storage tiers. The Azure page describes Azure alone, so neither source compares cloud providers. The AWS overview of IoT communication was in the search results but its article text did not load, so it is not used here.
Common questions
Where does IoT Hub keep device-to-cloud messages?
The Azure page says device-to-cloud messages are temporarily stored by IoT Hub, up to seven days, and can only be read in sequence.
How do device twin properties differ from messages?
The page says reported properties are stored by IoT Hub in the device twin and can be retrieved using the IoT Hub query language. Messages allow only sequential reading.
When do file uploads go to Azure Storage?
The page says file uploads are stored in a user-provided Azure Storage account.
What is the edge gateway communication model?
The survey says end devices use a local gateway as a conduit to connect to the application server in the cloud, and that this enables design decisions such as data aggregation at the gateway.
Written by Hamza Rivera. Facts in this article follow the editorial policy: each one is behavior that is well established or set by the standard named in the text. A confirmed error is fixed in the article and its Updated date changes.