With over 5 years of experience and 30+ successful deployments, we guarantee a robust edge solution. When deploying ML models at the edge, clients often face a bottleneck — network latency and data transfer costs. We offer a proven solution on Azure IoT Edge: models run locally, in containers, with orchestration from the cloud. This reduces latencies to milliseconds and saves up to 40% on traffic. Pricing: basic deployment from $1,500, custom modules from $5,000.
How to Deploy an ML Model on Azure IoT Edge
Azure's edge runtime runs containers (modules) on Edge devices with orchestration via IoT Hub. ML models from Azure Machine Learning are packaged into a Docker image and deployed via a deployment manifest. Integration with Azure Stream Analytics, Cognitive Services, ONNX Runtime — all under the hood.
IoT Edge runtime — two system containers: edgeAgent manages the lifecycle of modules according to the deployment manifest, edgeHub — a local MQTT/AMQP broker, message routing, and buffering during connection loss.
Deployment manifest (JSON) defines which modules to run, their parameters, and routes:
{
"modulesContent": {
"$edgeAgent": {
"properties.desired": {
"modules": {
"MLInference": {
"type": "docker",
"settings": {
"image": "myregistry.azurecr.io/ml-inference:1.2.0",
"createOptions": "{\"HostConfig\":{\"Devices\":[{\"PathOnHost\":\"/dev/video0\"}]}}"
}
}
}
}
},
"$edgeHub": {
"properties.desired": {
"routes": {
"MLToCloud": "FROM /messages/modules/MLInference/* INTO $upstream"
}
}
}
}
}
Step 1: Prepare ML Module via Azure Machine Learning
Workflow: training on compute cluster → register model in Model Registry → create IoT Edge package via Model.package() → push container to ACR → update manifest. Change the image version — IoT Hub automatically rolls out the update to the target group.
Step 2: Optimize with ONNX Runtime for Edge Inference
ONNX Runtime is a cross-platform engine with hardware optimization. On Intel CPU with OpenVINO, acceleration 2.5–3 times compared to pure Python; on NVIDIA Jetson via TensorRT — up to 5 times. Automated deployment via IoT Hub is 10 times faster than manual device updates. Example hardware-aware session:
import onnxruntime as ort
opts = ort.SessionOptions()
opts.graph_optimization_level = ort.GraphOptimizationLevel.ORT_ENABLE_ALL
opts.intra_op_num_threads = 4
providers = ['TensorrtExecutionProvider', 'CUDAExecutionProvider', 'CPUExecutionProvider']
session = ort.InferenceSession('model.onnx', opts, providers=providers)
def infer(image_np):
input_name = session.get_inputs()[0].name
return session.run(None, {input_name: image_np})
Ready-made Microsoft images: mcr.microsoft.com/azureml/onnxruntime:latest-openvino for Intel, :latest-jetpack for Jetson.
Module Interaction on the Edge
Module Twin and Direct Methods
Via module twin, change parameters on the fly (confidence threshold, model version) without rebuilding the container:
async def twin_patch_handler(patch):
if 'modelVersion' in patch:
await update_model(patch['modelVersion'])
if 'confidenceThreshold' in patch:
global THRESHOLD
THRESHOLD = patch['confidenceThreshold']
module_client.on_twin_desired_properties_patch_received = twin_patch_handler
async def method_handler(method_request):
if method_request.name == "GetStats":
payload = {"fps": current_fps, "detections_today": counter}
return MethodResponse.create_from_method_request(
method_request, 200, payload)
Direct Methods — synchronous call from the cloud (timeout 30 s). Used for diagnostics, module restart, getting statistics.
Message Routing
edgeHub routes messages by source, topic, properties. Example: all frames with resolution above Full HD are sent to the HiResProcessor module, and detections with confidence >0.9 — directly to the cloud:
FROM /messages/modules/Camera/* WHERE $body.width > 1920 INTO modules/HiResProcessor/inputs/frames
FROM /messages/modules/MLInference/* WHERE $body.confidence > 0.9 INTO $upstream
Azure Stream Analytics on the Edge
For real-time aggregation without the cloud: average temperature over a 30-second window, anomalies — all locally. Results sent to another module or to the cloud when network becomes available.
SELECT
System.Timestamp() as EventTime,
AVG(temperature) as AvgTemp,
COUNT(*) as Anomalies
INTO AlertOutput
FROM TemperatureInput TIMESTAMP BY EventTime
GROUP BY TumblingWindow(second, 30)
HAVING AVG(temperature) > 75 OR COUNT(*) > 10
Comparison of Deployment Methods
| Method | Speed | Scaling | Scenario |
|---|---|---|---|
| Manual manifest via portal | 10–30 min | Single devices | Testing/debugging |
| Automatic Deployment | 1–5 min | Thousands of devices | Industrial parks |
| DPS Zero-touch | At first boot | Millions | Mass production |
Comparison of Inference Backends
| Backend | Platform | Acceleration | Power consumption |
|---|---|---|---|
| OpenVINO | Intel CPU (Xeon, Core) | 2–3x vs Python | Low |
| TensorRT | NVIDIA GPU (Jetson, T4) | 3–5x vs Python | Medium |
| ONNX Runtime CPU | Any x86/ARM | 1.5–2x vs Python | Minimal |
| Triton Inference Server | NVIDIA GPU | 2–4x vs Python | Medium |
Fleet Management via IoT Hub
Device Provisioning Service (DPS) — zero-touch provisioning: device registers with DPS at first boot, automatically assigned to IoT Hub and receives deployment. Automatic Deployments with target condition tags.location = 'factory-A' — rollout by groups with priorities.
Monitoring: Azure Monitor + built-in metrics (connected devices, messages/day). Custom metrics via send_message() with application properties for filtering in Log Analytics.
What Is Included in the Work
- Infrastructure audit and inference requirements
- Development and containerization of ML module (ONNX / TensorRT / OpenVINO)
- Configuration of deployment manifest and routing
- DPS integration for scaling
- Documentation, training sessions, access to ACR, IoT Hub, and DPS
- Technical support for 3 months
We guarantee stable operation under load: latency p99 < 200 ms on Jetson Nano with YOLOv5 model, uptime 99.9% during connection loss up to 4 hours.
Timeline: 3–6 weeks
Basic deployment with Azure ML model — 1–2 weeks. Custom modules, ASA Edge, OPC Publisher integration with industrial equipment, DPS fleet provisioning — 5–6 weeks. For MLOps edge scenarios, we integrate continuous deployment pipelines. Evaluate your project — contact us for a consultation. Request an audit of your infrastructure to get exact timelines and cost.
Source: Azure IoT Edge documentation







