Azure IoT Architecture

Understanding Azure IoT Architecture

Azure IoT provides a scalable, secure, and flexible platform for connecting, monitoring, and managing billions of devices. The architecture is composed of several key layers that work together to deliver end‑to‑end IoT solutions.

Core Architecture Layers

  1. Device Layer – Sensors, actuators, and edge devices that generate data.
  2. Connectivity Layer – Protocols and gateways that enable reliable communication.
  3. IoT Hub & Edge – Central messaging hub and edge runtime for bi‑directional communication.
  4. Data Ingestion & Storage – Services like Event Hubs, Blob Storage, and Cosmos DB.
  5. Analytics & Insights – Stream Analytics, Time Series Insights, and Azure Machine Learning.
  6. Application & Integration – Power Apps, Logic Apps, Functions, and third‑party services.
  7. Security & Management – Identity, device provisioning, and monitoring.

Device Connectivity

Azure IoT supports MQTT, AMQP, HTTPS, and custom protocols via IoT Edge. Devices can connect directly to IoT Hub or through a gateway for offline scenarios.

Cloud Services

Key services include:

Data Processing & Analytics

Telemetry flows through Stream Analytics to Power BI, Azure Functions, or custom endpoints. Time Series Insights provides interactive exploration of temporal data.

Security Approach

The security model is built on a layered approach:

Sample Architecture Diagram

Sample Azure IoT Architecture Diagram

Code Sample – Telemetry Ingestion

using Microsoft.Azure.Devices.Client;
using System.Text;
using System.Threading.Tasks;

class Telemetry
{
    static async Task Main()
    {
        var deviceConnectionString = Environment.GetEnvironmentVariable("IOT_HUB_CONNECTION");
        var deviceClient = DeviceClient.CreateFromConnectionString(deviceConnectionString, TransportType.Mqtt);
        while (true)
        {
            var temperature = 20 + new Random().NextDouble() * 15;
            var payload = $@"{{""temperature"":{temperature:0.00}}}";
            var message = new Message(Encoding.UTF8.GetBytes(payload));
            await deviceClient.SendEventAsync(message);
            await Task.Delay(5000);
        }
    }
}

Run this sample on a device or edge module to start sending temperature telemetry to Azure IoT Hub.