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

@supaiku0
Copy link
Contributor

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)
supaiku0 added 2 commits Sep 6, 2019

@supaiku0 supaiku0 changed the title refactor(core-p2p): share rate limiter between worker refactor(core-p2p): share rate limiter between workers Sep 6, 2019

@codecov-io

This comment has been minimized.

Copy link

commented Sep 6, 2019

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

49 of 52 checks passed

security/snyk - deprecated/core-graphql/package.json (ArkEcosystem) Manifest not found
Details
security/snyk - deprecated/core-json-rpc/package.json (ArkEcosystem) Manifest not found
Details
security/snyk - deprecated/core-snapshots-cli/package.json (ArkEcosystem) Manifest not found
Details
Codacy/PR Quality Review Up to standards. A positive pull request.
Details
LGTM analysis: JavaScript No new or fixed alerts
Details
ci/circleci: node11-benchmark Your tests passed on CircleCI!
Details
ci/circleci: node11-e2e Your tests passed on CircleCI!
Details
ci/circleci: node11-functional Your tests passed on CircleCI!
Details
ci/circleci: node11-integration Your tests passed on CircleCI!
Details
ci/circleci: node11-unit Your tests passed on CircleCI!
Details
ci/circleci: node12-benchmark Your tests passed on CircleCI!
Details
ci/circleci: node12-e2e Your tests passed on CircleCI!
Details
ci/circleci: node12-functional Your tests passed on CircleCI!
Details
ci/circleci: node12-integration Your tests passed on CircleCI!
Details
ci/circleci: node12-unit Your tests passed on CircleCI!
Details
security/snyk - __tests__/e2e/package.json (ArkEcosystem) No manifest changes detected
security/snyk - package.json (ArkEcosystem) No manifest changes detected
security/snyk - packages/core-api/package.json (ArkEcosystem) No manifest changes detected
security/snyk - packages/core-blockchain/package.json (ArkEcosystem) No manifest changes detected
security/snyk - packages/core-container/package.json (ArkEcosystem) No manifest changes detected
security/snyk - packages/core-database-postgres/package.json (ArkEcosystem) No manifest changes detected
security/snyk - packages/core-database/package.json (ArkEcosystem) No manifest changes detected
security/snyk - packages/core-elasticsearch/package.json (ArkEcosystem) No manifest changes detected
security/snyk - packages/core-error-tracker-airbrake/package.json (ArkEcosystem) No manifest changes detected
security/snyk - packages/core-error-tracker-bugsnag/package.json (ArkEcosystem) No manifest changes detected
security/snyk - packages/core-error-tracker-raygun/package.json (ArkEcosystem) No manifest changes detected
security/snyk - packages/core-error-tracker-rollbar/package.json (ArkEcosystem) No manifest changes detected
security/snyk - packages/core-error-tracker-sentry/package.json (ArkEcosystem) No manifest changes detected
security/snyk - packages/core-event-emitter/package.json (ArkEcosystem) No manifest changes detected
security/snyk - packages/core-exchange-json-rpc/package.json (ArkEcosystem) No manifest changes detected
security/snyk - packages/core-explorer/package.json (ArkEcosystem) No manifest changes detected
security/snyk - packages/core-forger/package.json (ArkEcosystem) No manifest changes detected
security/snyk - packages/core-http-utils/package.json (ArkEcosystem) No manifest changes detected
security/snyk - packages/core-interfaces/package.json (ArkEcosystem) No manifest changes detected
security/snyk - packages/core-jest-matchers/package.json (ArkEcosystem) No manifest changes detected
security/snyk - packages/core-logger-pino/package.json (ArkEcosystem) No manifest changes detected
security/snyk - packages/core-logger-signale/package.json (ArkEcosystem) No manifest changes detected
security/snyk - packages/core-logger-winston/package.json (ArkEcosystem) No manifest changes detected
security/snyk - packages/core-logger/package.json (ArkEcosystem) No manifest changes detected
security/snyk - packages/core-new-relic/package.json (ArkEcosystem) No manifest changes detected
security/snyk - packages/core-p2p/package.json (ArkEcosystem) No manifest changes detected
security/snyk - packages/core-snapshots/package.json (ArkEcosystem) No manifest changes detected
security/snyk - packages/core-state/package.json (ArkEcosystem) No manifest changes detected
security/snyk - packages/core-tester-cli/package.json (ArkEcosystem) No manifest changes detected
security/snyk - packages/core-transaction-pool/package.json (ArkEcosystem) No manifest changes detected
security/snyk - packages/core-transactions/package.json (ArkEcosystem) No manifest changes detected
security/snyk - packages/core-utils/package.json (ArkEcosystem) No manifest changes detected
security/snyk - packages/core-vote-report/package.json (ArkEcosystem) No manifest changes detected
security/snyk - packages/core-wallet-api/package.json (ArkEcosystem) No manifest changes detected
security/snyk - packages/core-webhooks/package.json (ArkEcosystem) No manifest changes detected
security/snyk - packages/core/package.json (ArkEcosystem) No manifest changes detected
security/snyk - packages/crypto/package.json (ArkEcosystem) No manifest changes detected

@ArkEcosystemBot ArkEcosystemBot deleted the refactor/core-p2p/shared-ratelimiter branch Sep 6, 2019

vasild added a commit that referenced this pull request Sep 6, 2019
Merge remote-tracking branch 'ArkEcosystem/core/develop' into is-bloc…
…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
Projects
None yet
4 participants
You can’t perform that action at this time.