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.
Copyright (C) Amazon Web Services, Inc. or its affiliates. All rights reserved.