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

refactor(core-p2p): share rate limiter between workers #2912

Merged
merged 3 commits into from
Sep 6, 2019

Conversation

spkjp
Copy link
Contributor

@spkjp spkjp commented Sep 6, 2019

Moves the rate limiter into the main process instead of having a local rate limiter per worker.

Still needs to be properly tested to see if it is still as effective, but it can already be merged and reverted/tweaked later on if it turns out that the communication overhead is making things worse.

What kind of change does this PR introduce?

  • Bugfix
  • Feature
  • Refactor
  • Performance
  • Tests
  • Build
  • Documentation
  • Code style update
  • Continuous Integration
  • Other, please describe:

Does this PR introduce a breaking change?

  • Yes
  • No

Does this PR release a new version?

  • Yes
  • No

If yes, please describe the impact and migration path for existing applications:

The PR fulfills these requirements:

  • It's submitted to the develop branch, not the master branch
  • All tests are passing
  • New/updated tests are included

If adding a new feature, the PR's description includes:

  • A convincing reason for adding this feature (to avoid wasting your time, it's best to open a suggestion issue first and wait for approval before working on it)

@spkjp spkjp changed the title refactor(core-p2p): share rate limiter between worker refactor(core-p2p): share rate limiter between workers Sep 6, 2019
@codecov-io
Copy link

Codecov Report

Merging #2912 into develop will increase coverage by 0.1%.
The diff coverage is 70%.

Impacted file tree graph

@@            Coverage Diff             @@
##           develop    #2912     +/-   ##
==========================================
+ Coverage    68.07%   68.17%   +0.1%     
==========================================
  Files          405      406      +1     
  Lines         9754     9767     +13     
  Branches       464      507     +43     
==========================================
+ Hits          6640     6659     +19     
+ Misses        3077     3067     -10     
- Partials        37       41      +4
Impacted Files Coverage Δ
packages/core-p2p/src/rate-limiter.ts 100% <ø> (ø)
packages/core-p2p/src/socket-server/worker.ts 21.87% <0%> (-2.75%) ⬇️
...es/core-p2p/src/socket-server/versions/internal.ts 100% <100%> (ø) ⬆️
packages/core-p2p/src/network-monitor.ts 69.1% <100%> (+0.66%) ⬆️
packages/core-p2p/src/utils/build-rate-limiter.ts 100% <100%> (ø)
packages/core-api/src/handlers/utils.ts 74.07% <0%> (ø) ⬆️
packages/core-logger-winston/src/formatter.ts 41.66% <0%> (ø) ⬆️
...es/core-blockchain/src/replay/replay-blockchain.ts 0% <0%> (ø) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update e8588e3...a7941bf. Read the comment docs.

@faustbrian faustbrian merged commit 97be5df into develop Sep 6, 2019
@ghost ghost deleted the refactor/core-p2p/shared-ratelimiter branch September 6, 2019 07:24
vasild added a commit that referenced this pull request Sep 6, 2019
…k-chained-verbose

* ArkEcosystem/core/develop:
  refactor(core-p2p): share rate limiter between workers (#2912)
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.

3 participants