Download FreeRTOS
 

Quality RTOS & Embedded Software

LIBRARIES
WHAT'S NEW
Simplifying Authenticated Cloud Connectivity for Any Device.
Designing an energy efficient and cloud-connected IoT solution with CoAP.
Introducing FreeRTOS Kernel version 11.0.0:
FreeRTOS Roadmap and Code Contribution process.
OPC-UA over TSN with FreeRTOS.
This section links to demo projects suitable for learning to use the Backoff Algorithm library. Separately, the IoT Reference Integrations section demonstrates the library integrated into an application.

Backoff Algorithm

Introduction

The backoffAlgorithm library is a utility library to space out repeated retransmissions of the same block of data, to avoid network congestion. This library calculates backoff period for retrying network operations (like failed network connection with server) using an exponential backoff with jitter algorithm.

Exponential backoff with jitter is typically used when retrying a failed connection or network request to the server. An exponential backoff with jitter helps to mitigate the failed network operations with servers, that are caused due to network congestion or high load on the server, by spreading out retry requests across multiple devices attempting network connections. Besides, in an environment with poor connectivity, a client can get disconnected at any time. A backoff strategy helps the client to conserve battery by not repeatedly attempting reconnections when they are unlikely to succeed.

The library is written in C and designed to be compliant with ISO C90 and MISRA C:2012. The library has no dependencies on any additional libraries other than the standard C library and has no heap allocation, making it suitable for IoT microcontrollers, but also fully portable to other platforms.

See the backoffAlgorithm library API Reference.

This library can be freely used and is distributed under the MIT open source license.

 

Code Size of backoffAlgorithm (example generated with GCC for ARM Cortex-M)
FileWith -O1 OptimizationWith -Os Optimization
backoff_algorithm.c0.1K0.1K
Total estimates0.1K0.1K
Copyright (C) Amazon Web Services, Inc. or its affiliates. All rights reserved.