Add note regading API jitter on target state poll

Change-type: patch
This commit is contained in:
Felipe Lalanne 2023-04-07 14:22:35 -04:00 committed by Page-
parent f7396cf335
commit b107868765

View File

@ -165,6 +165,9 @@ const poll = async (
fetchErrors: number = 0,
): Promise<void> => {
// Add random jitter up to `maxApiJitterDelay` to space out poll requests
// NOTE: the jitter has as objective to reduce the load on networks that have
// devices on the 1000s. It's not meant to ease the load on the API as the backend performs
// other operations to deal with scaling issues
let pollInterval =
Math.random() * constants.maxApiJitterDelay + appUpdatePollInterval;