Azure / Azure/fetch-event-source

Exponential reconnect backoff

Open
#57 2 comments 1 reaction 0 assignees View on GitHub
Dominant language
TypeScript
Stars
2.9k
Forks
196
PR merge metrics
No merged PRs in 30d

Description

When fetch-event-source loses it's connection to the server, it tries to reconnect rather aggressively. Given enough clients, this continious repeating traffic pattern may pose an unneccesary risk of overloading a router/ load balancer that might still be receiving the traffic.

![grafik](https://github.com/Azure/fetch-event-source/assets/11522213/76728737-ea18-47a0-8d70-6ee4dac94eb1)

This issue proposes to implement an exponential backoff behavior that increases the reconnect time with each unsuccessful reconnect iteration (see https://www.npmjs.com/package/exponential-backoff for an example implementation)

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.