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

⚗️[RUMF-1351] experiment request retry strategy #1700

Merged
merged 14 commits into from
Aug 31, 2022

Conversation

bcaudan
Copy link
Contributor

@bcaudan bcaudan commented Aug 19, 2022

Motivation

We want to improve our data transfer to:

  • limit our impact on end user bandwidth
  • not loose data in case of short intake unavailability

Changes

Introduce new request strategy allowing us to:

  • limit the number of concurrent requests to the intake -> max 32 by product
  • limit the total ongoing bytes of requests to the intake -> max 80kb by product
  • retry requests if the intake is momentarily unavailable -> exponential backoff strategy 1s to 256s
  • limit the size of queued requests due to throttling or failure -> max 3Mb by product

Behind retry flag, use this new strategy for logs/rum for non exit requests.

Testing

  • Local
  • Staging
  • Unit
  • End to end

I have gone over the contributing documentation.

@bcaudan bcaudan force-pushed the bcaudan/implement-retry branch 4 times, most recently from 55d276b to f4bdb08 Compare August 26, 2022 15:35
@bcaudan bcaudan force-pushed the bcaudan/implement-retry branch from f4bdb08 to 4e28db2 Compare August 29, 2022 15:44
@bcaudan bcaudan force-pushed the bcaudan/implement-retry branch from 989d790 to 82c719f Compare August 29, 2022 16:05
@bcaudan bcaudan marked this pull request as ready for review August 29, 2022 16:10
@bcaudan bcaudan requested review from a team as code owners August 29, 2022 16:10
packages/core/src/tools/utils.ts Outdated Show resolved Hide resolved
packages/core/src/transport/sendWithRetryStrategy.ts Outdated Show resolved Hide resolved
packages/core/src/transport/sendWithRetryStrategy.ts Outdated Show resolved Hide resolved
packages/core/src/transport/sendWithRetryStrategy.ts Outdated Show resolved Hide resolved
@codecov-commenter
Copy link

codecov-commenter commented Aug 30, 2022

Codecov Report

Merging #1700 (17f1c6d) into main (a927da5) will increase coverage by 0.10%.
The diff coverage is 97.65%.

@@            Coverage Diff             @@
##             main    #1700      +/-   ##
==========================================
+ Coverage   90.87%   90.97%   +0.10%     
==========================================
  Files         128      129       +1     
  Lines        4812     4911      +99     
  Branches     1071     1089      +18     
==========================================
+ Hits         4373     4468      +95     
- Misses        439      443       +4     
Impacted Files Coverage Δ
...ges/core/src/domain/configuration/configuration.ts 100.00% <ø> (ø)
packages/core/src/transport/httpRequest.ts 95.34% <94.59%> (-4.66%) ⬇️
...ckages/core/src/transport/sendWithRetryStrategy.ts 98.83% <98.83%> (ø)
packages/core/src/tools/utils.ts 82.11% <100.00%> (+0.07%) ⬆️
packages/core/src/transport/batch.ts 93.02% <100.00%> (-1.17%) ⬇️
packages/logs/src/domain/configuration.ts 100.00% <100.00%> (ø)
packages/rum/src/transport/send.ts 100.00% <100.00%> (ø)

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants