Best Practice 11.4 – Use an exponential backoff with jitter and retry logic to connect remote devices to the cloud
Consider implementing a retry mechanism for IoT device software. The retry mechanism should have exponential backoff with a randomization factor built in to avoid retries from multiple devices occurring simultaneously. Implementing retry logic with exponential backoff with jitter allows the IoT devices to more evenly distribute their traffic and prevent them from creating unnecessary peak traffic.
Recommendation 11.4.1 – Implement logic in the cloud to notify the device operator if a device has not connected for an extended period of time
-
AWS IoT Events can be used to monitor devices remotely.
Recommendation 11.4.2 – Use device edge software and the SDK to leverage built in exponential back off logic
-
Exponential backoff logic is included in the AWS SDK, including the AWS IoT Device SDK, and edge software, such as AWS IoT Greengrass Core and FreeRTOS.
-
AWS IoT Device SDK for C uses “IOT_MQTT_RETRY_MS_CEILING” for setting maximum retry interval limit.
Recommendation 11.4.3 – Establish alternate network channels to meet requirements
-
Have a separate failover network channel to deliver critical messages to AWS IoT. Failover channels can include WiFi, cellular networks, or a wireless personal network.
-
For low latency workload, use AWS Wavelength
for 5G devices and AWS Local Zones to keep your cloud services closer to the user.