Implement a backoff strategy for stream status queries to offline instances. #3

Open
opened 2025-04-03 13:28:45 -04:00 by LogalDeveloper · 0 comments

Currently, the bot queries stream status every minute without any variation. This routine does not account for situations where an instance goes offline for an extended period of time. A backoff strategy should be implemented which gradually increases the query interval when an instance is consistently detected as offline.

The maximum query interval needs to be selected carefully. Some streamers only run their instances during active streaming sessions and intentionally take it offline after. The maximum query interval needs to balance reducing unnecessary network traffic and ensuring instances with regular long downtime aren't missed. A value of 15 minutes may be sufficient.

Finally within this topic, it may be worth properly handling code 429 HTTP responses. Owncast does not implement rate limiting on its own and I have not seen this code in the wild, but instances can always be hosted behind reverse proxies which enforce their own policies.

Currently, the bot queries stream status every minute without any variation. This routine does not account for situations where an instance goes offline for an extended period of time. A backoff strategy should be implemented which gradually increases the query interval when an instance is consistently detected as offline. The maximum query interval needs to be selected carefully. Some streamers only run their instances during active streaming sessions and intentionally take it offline after. The maximum query interval needs to balance reducing unnecessary network traffic and ensuring instances with regular long downtime aren't missed. A value of 15 minutes may be sufficient. Finally within this topic, it may be worth properly handling code 429 HTTP responses. Owncast does not implement rate limiting on its own and I have not seen this code in the wild, but instances can always be hosted behind reverse proxies which enforce their own policies.
LogalDeveloper added the Enhancement label 2025-04-03 13:28:45 -04:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: LogalDeveloper/OwncastSentry#3