Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[msg] Exponential backoff should be implemented according to specification #15799

Closed
turon opened this issue Mar 3, 2022 · 0 comments · Fixed by #16026
Closed

[msg] Exponential backoff should be implemented according to specification #15799

turon opened this issue Mar 3, 2022 · 0 comments · Fixed by #16026

Comments

@turon
Copy link
Contributor

turon commented Mar 3, 2022

Problem

The exponential backoff algorithm in the SDK does not match the specification.

Proposed Solution

Fix and align behavior with spec.

turon added a commit to turon/connectedhomeip that referenced this issue Mar 9, 2022
@turon turon self-assigned this Mar 9, 2022
turon added a commit to turon/connectedhomeip that referenced this issue Mar 9, 2022
turon added a commit to turon/connectedhomeip that referenced this issue Mar 9, 2022
turon added a commit to turon/connectedhomeip that referenced this issue Mar 15, 2022
turon added a commit to turon/connectedhomeip that referenced this issue Mar 16, 2022
turon added a commit to turon/connectedhomeip that referenced this issue Mar 18, 2022
turon added a commit to turon/connectedhomeip that referenced this issue Mar 29, 2022
turon added a commit to turon/connectedhomeip that referenced this issue Mar 30, 2022
turon added a commit to turon/connectedhomeip that referenced this issue Mar 30, 2022
turon added a commit to turon/connectedhomeip that referenced this issue Mar 30, 2022
turon added a commit that referenced this issue Mar 30, 2022
Fix #15799
- Add exponential backoff.
- Add unit test for exponential backoff calculation.
- Add spec refs to backoff implementation.

Implements the backoff algorithm as specified but in fixed point:

```
t = i⋅MRP_BACKOFF_BASE^max(0,n−MRP_BACKOFF_THRESHOLD) ⋅ (1.0+random(0,1)⋅MRP_BACKOFF_JITTER)

Where:

  t = the resultant retransmission timeout for this transmission
  n = the transmission count of the message, starting with 0 
  i = the base retry interval for the Exchange (either IDLE or ACTIVE)

MRP_BACKOFF_BASE      | 1.6  | The base number for the exponential backoff equation.
MRP_BACKOFF_JITTER    | 0.25 | The scaler for random jitter in the backoff equation.
MRP_BACKOFF_THRESHOLD | 1    | # of retransmissions before transition from linear to exponential backoff.
```
rochaferraz pushed a commit to rochaferraz/connectedhomeip that referenced this issue Mar 31, 2022
…#16026)

Fix project-chip#15799
- Add exponential backoff.
- Add unit test for exponential backoff calculation.
- Add spec refs to backoff implementation.

Implements the backoff algorithm as specified but in fixed point:

```
t = i⋅MRP_BACKOFF_BASE^max(0,n−MRP_BACKOFF_THRESHOLD) ⋅ (1.0+random(0,1)⋅MRP_BACKOFF_JITTER)

Where:

  t = the resultant retransmission timeout for this transmission
  n = the transmission count of the message, starting with 0 
  i = the base retry interval for the Exchange (either IDLE or ACTIVE)

MRP_BACKOFF_BASE      | 1.6  | The base number for the exponential backoff equation.
MRP_BACKOFF_JITTER    | 0.25 | The scaler for random jitter in the backoff equation.
MRP_BACKOFF_THRESHOLD | 1    | # of retransmissions before transition from linear to exponential backoff.
```
andrei-menzopol pushed a commit to andrei-menzopol/connectedhomeip that referenced this issue Apr 14, 2022
…#16026)

Fix project-chip#15799
- Add exponential backoff.
- Add unit test for exponential backoff calculation.
- Add spec refs to backoff implementation.

Implements the backoff algorithm as specified but in fixed point:

```
t = i⋅MRP_BACKOFF_BASE^max(0,n−MRP_BACKOFF_THRESHOLD) ⋅ (1.0+random(0,1)⋅MRP_BACKOFF_JITTER)

Where:

  t = the resultant retransmission timeout for this transmission
  n = the transmission count of the message, starting with 0 
  i = the base retry interval for the Exchange (either IDLE or ACTIVE)

MRP_BACKOFF_BASE      | 1.6  | The base number for the exponential backoff equation.
MRP_BACKOFF_JITTER    | 0.25 | The scaler for random jitter in the backoff equation.
MRP_BACKOFF_THRESHOLD | 1    | # of retransmissions before transition from linear to exponential backoff.
```
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant