dapr icon indicating copy to clipboard operation
dapr copied to clipboard

Placement: Disseminate rate limiting

Open JoshVanL opened this issue 1 year ago • 14 comments

Currently, placement is using a static 500ms interval to check whether it needs to update tables in the event that membership has changed. This is problematic because 1. continually checking every 500ms is wasteful whilst also slowing down a single instance joining placement, and 2. in the event of a large amount of churn in the Daprd cluster, results in a larger number of table writes which in itself is expensive.

PR updates the dissemination table channel to use a coalescing rate limiter. This has the benefit of both immediately joining new members if they join in isolation, as well as reducing the number of table updates in the event that there is a burst of members churning. The rate limit is exponential, starting at 200ms, maximum 4s. To prevent the table from ever being updated in the event of a large throughput, the maximum number of pending member updates is 5. If there are 5 pending membership updates the table is force updated regardless of the rate limiting status.

Adds actor invoke integration tests using 3 unique actor types on 3 daprds, in both HTTP and gRPC.

PR replaces kit with my personal fork which has the implementation of the rate limiter https://github.com/dapr/kit/pull/64. This PR should hold until that has been merged to dapr/kit.

JoshVanL avatar Oct 21 '23 13:10 JoshVanL

Codecov Report

Attention: Patch coverage is 86.20690% with 4 lines in your changes missing coverage. Please review.

Project coverage is 62.19%. Comparing base (b0e40d2) to head (639c4d6). Report is 159 commits behind head on master.

Files Patch % Lines
pkg/placement/placement.go 83.33% 2 Missing and 2 partials :warning:
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #7069      +/-   ##
==========================================
+ Coverage   62.17%   62.19%   +0.01%     
==========================================
  Files         245      245              
  Lines       22435    22445      +10     
==========================================
+ Hits        13950    13959       +9     
  Misses       7319     7319              
- Partials     1166     1167       +1     

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

codecov[bot] avatar Oct 21 '23 13:10 codecov[bot]

Moving to draft until dapr/kit#64 is merged

ItalyPaleAle avatar Oct 21 '23 18:10 ItalyPaleAle

@JoshVanL please resolve conflicts and see failing tests

yaron2 avatar Jan 18 '24 19:01 yaron2

/ok-to-test

yaron2 avatar Jan 19 '24 01:01 yaron2

/ok-to-test

yaron2 avatar Jan 19 '24 01:01 yaron2

Dapr E2E test

🔗 Link to Action run

Commit ref: 517a11d7ee8a2d5be1bc07f60db7047923a43964

✅ Build succeeded for linux/amd64

  • Image tag: dapre2ee8d225ef87l
  • Test image tag: dapre2ee8d225ef87l

✅ Infrastructure deployed

Cluster Resource group name Azure region
Linux Dapr-E2E-dapre2ee8d225ef87l westus3
Windows Dapr-E2E-dapre2ee8d225ef87w westus3
Linux/arm64 Dapr-E2E-dapre2ee8d225ef87la eastus

✅ Build succeeded for windows/amd64

  • Image tag: dapre2ee8d225ef87w
  • Test image tag: dapre2ee8d225ef87w

❌ Tests failed on windows/amd64

Please check the logs for details on the error.

❌ Tests failed on linux/amd64

Please check the logs for details on the error.

dapr-bot avatar Jan 19 '24 02:01 dapr-bot

Dapr E2E test

🔗 Link to Action run

Commit ref: 517a11d7ee8a2d5be1bc07f60db7047923a43964

✅ Build succeeded for linux/amd64

  • Image tag: dapre2e7179ee98d3l
  • Test image tag: dapre2e7179ee98d3l

✅ Infrastructure deployed

Cluster Resource group name Azure region
Linux Dapr-E2E-dapre2e7179ee98d3l westus3
Windows Dapr-E2E-dapre2e7179ee98d3w westus3
Linux/arm64 Dapr-E2E-dapre2e7179ee98d3la eastus

✅ Build succeeded for windows/amd64

  • Image tag: dapre2e7179ee98d3w
  • Test image tag: dapre2e7179ee98d3w

❌ Tests failed on windows/amd64

Please check the logs for details on the error.

❌ Tests failed on linux/amd64

Please check the logs for details on the error.

dapr-bot avatar Jan 19 '24 02:01 dapr-bot

/version-skew-tests

JoshVanL avatar Jan 20 '24 14:01 JoshVanL

/test-version-skew

JoshVanL avatar Jan 20 '24 14:01 JoshVanL

Dapr Version Skew e2e test (control-plane-master - 1.12.4)

🔗 Link to Action run

Commit ref: cb8f2c581f2e58ec310993c4ad122802b2e4c55d

✅ Version Skew tests passed

dapr-bot avatar Jan 20 '24 14:01 dapr-bot

Dapr Version Skew integration test (dapr-sidecar-master - 1.12.4)

🔗 Link to Action run

Commit ref: cb8f2c581f2e58ec310993c4ad122802b2e4c55d

✅ Version Skew tests passed

dapr-bot avatar Jan 20 '24 14:01 dapr-bot

Dapr Version Skew e2e test (dapr-sidecar-master - 1.12.4)

🔗 Link to Action run

Commit ref: cb8f2c581f2e58ec310993c4ad122802b2e4c55d

✅ Version Skew tests passed

dapr-bot avatar Jan 20 '24 14:01 dapr-bot

Dapr Version Skew integration test (control-plane-master - 1.12.4)

🔗 Link to Action run

Commit ref: cb8f2c581f2e58ec310993c4ad122802b2e4c55d

✅ Version Skew tests passed

dapr-bot avatar Jan 20 '24 14:01 dapr-bot

This pull request has been automatically marked as stale because it has not had activity in the last 60 days. It will be closed in 7 days if no further activity occurs. Please feel free to give a status update now, ping for review, or re-open when it's ready. Thank you for your contributions!

dapr-bot avatar May 05 '24 15:05 dapr-bot

This pull request has been automatically marked as stale because it has not had activity in the last 60 days. It will be closed in 7 days if no further activity occurs. Please feel free to give a status update now, ping for review, or re-open when it's ready. Thank you for your contributions!

dapr-bot avatar Jul 04 '24 15:07 dapr-bot