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

[CAPPL-403] Workflow Engine Rate Limiter #15939

Merged
merged 16 commits into from
Jan 22, 2025
Merged

[CAPPL-403] Workflow Engine Rate Limiter #15939

merged 16 commits into from
Jan 22, 2025

Conversation

justinkaseman
Copy link
Contributor

@justinkaseman justinkaseman commented Jan 15, 2025

Description

Adds rate limiting on the workflow executions (when the trigger event is being read) of the workflow engine.

There are two buckets of rate limits on every workflow execution:

  • Globally across all workflows on the node (whether started from the syncer or delegate)
  • Per User (workflow owner)

Within this there are two types of rate limit:

  • RPS - allowed executions per seconds
  • Burst - allowed concurrent executions

When the rate limit has been reached for either bucket, the workflow execution will be skipped.
In this scenario, a Beholder custom message is emitted and a newly added counter metric is incremented.

Configuration

Adds new config to the node .toml config with the following defaults:

[Capabilities.RateLimit]
# GlobalRPS is the global rate limit for the dispatcher.
GlobalRPS = 800 # Default
# GlobalBurst is the global burst limit for the dispatcher.
GlobalBurst = 1000 # Default
# PerSenderRPS is the per-sender rate limit for the dispatcher.
PerSenderRPS = 10 # Default
# PerSenderBurst is the per-sender burst limit for the dispatcher.
PerSenderBurst = 50 # Default

Copy link
Contributor

github-actions bot commented Jan 15, 2025

AER Report: CI Core ran successfully ✅

aer_workflow , commit

AER Report: Operator UI CI ran successfully ✅

aer_workflow , commit

Copy link
Contributor

Flakeguard Summary

Ran new or updated tests between develop and 721c7f6 (CAPPL-403).

View Flaky Detector Details | Compare Changes

Found Flaky Tests ❌

Name Pass Ratio Panicked? Timed Out? Race? Runs Successes Failures Skips Package Package Panicked? Avg Duration Code Owners
TestConfig_Marshal 0.00% false false false 3 0 3 0 github.com/smartcontractkit/chainlink/v2/core/services/chainlink false 40ms Unknown
TestConfig_Marshal/full 0.00% false false false 3 0 3 0 github.com/smartcontractkit/chainlink/v2/core/services/chainlink false 13.333333ms Unknown
TestConfig_full 0.00% false false false 3 0 3 0 github.com/smartcontractkit/chainlink/v2/core/services/chainlink false 3.333333ms Unknown
TestConfig_setDefaults 0.00% false false false 3 0 3 0 github.com/smartcontractkit/chainlink/v2/core/services/chainlink false 0s Unknown

Artifacts

For detailed logs of the failed tests, please refer to the artifact failed-test-results-with-logs.json.

Copy link
Contributor

Flakeguard Summary

Ran new or updated tests between develop and ee6ebb9 (CAPPL-403).

View Flaky Detector Details | Compare Changes

Found Flaky Tests ❌

Name Pass Ratio Panicked? Timed Out? Race? Runs Successes Failures Skips Package Package Panicked? Avg Duration Code Owners
TestConfig_Marshal 0.00% false false false 3 0 3 0 github.com/smartcontractkit/chainlink/v2/core/services/chainlink false 40ms Unknown
TestConfig_Marshal/full 0.00% false false false 3 0 3 0 github.com/smartcontractkit/chainlink/v2/core/services/chainlink false 13.333333ms Unknown
TestConfig_full 0.00% false false false 3 0 3 0 github.com/smartcontractkit/chainlink/v2/core/services/chainlink false 3.333333ms Unknown
Test_generalConfig_LogConfiguration 0.00% false false false 3 0 3 0 github.com/smartcontractkit/chainlink/v2/core/services/chainlink false 26.666666ms Unknown
Test_generalConfig_LogConfiguration/empty 0.00% false false false 3 0 3 0 github.com/smartcontractkit/chainlink/v2/core/services/chainlink false 0s Unknown
Test_generalConfig_LogConfiguration/full 0.00% false false false 3 0 3 0 github.com/smartcontractkit/chainlink/v2/core/services/chainlink false 10ms Unknown
Test_generalConfig_LogConfiguration/multi-chain 0.00% false false false 3 0 3 0 github.com/smartcontractkit/chainlink/v2/core/services/chainlink false 10ms Unknown

Artifacts

For detailed logs of the failed tests, please refer to the artifact failed-test-results-with-logs.json.

Copy link
Contributor

Flakeguard Summary

Ran new or updated tests between develop and 70dcac1 (CAPPL-403).

View Flaky Detector Details | Compare Changes

Found Flaky Tests ❌

Name Pass Ratio Panicked? Timed Out? Race? Runs Successes Failures Skips Package Package Panicked? Avg Duration Code Owners
TestConfig_Marshal 0.00% false false false 3 0 3 0 github.com/smartcontractkit/chainlink/v2/core/services/chainlink false 40ms Unknown
TestConfig_Marshal/full 0.00% false false false 3 0 3 0 github.com/smartcontractkit/chainlink/v2/core/services/chainlink false 10ms Unknown
TestConfig_full 0.00% false false false 3 0 3 0 github.com/smartcontractkit/chainlink/v2/core/services/chainlink false 0s Unknown
Test_generalConfig_LogConfiguration 0.00% false false false 3 0 3 0 github.com/smartcontractkit/chainlink/v2/core/services/chainlink false 23.333333ms Unknown
Test_generalConfig_LogConfiguration/empty 0.00% false false false 3 0 3 0 github.com/smartcontractkit/chainlink/v2/core/services/chainlink false 0s Unknown
Test_generalConfig_LogConfiguration/full 0.00% false false false 3 0 3 0 github.com/smartcontractkit/chainlink/v2/core/services/chainlink false 10ms Unknown
Test_generalConfig_LogConfiguration/multi-chain 0.00% false false false 3 0 3 0 github.com/smartcontractkit/chainlink/v2/core/services/chainlink false 10ms Unknown

Artifacts

For detailed logs of the failed tests, please refer to the artifact failed-test-results-with-logs.json.

@justinkaseman justinkaseman changed the title [DRAFT] Workflow Engine Rate Limiter Workflow Engine Rate Limiter Jan 22, 2025
@justinkaseman justinkaseman marked this pull request as ready for review January 22, 2025 06:09
@justinkaseman justinkaseman requested review from a team as code owners January 22, 2025 06:09
Copy link
Contributor

Flakeguard Summary

Ran new or updated tests between develop and 8aeb0e0 (CAPPL-403).

View Flaky Detector Details | Compare Changes

Found Flaky Tests ❌

Name Pass Ratio Panicked? Timed Out? Race? Runs Successes Failures Skips Package Package Panicked? Avg Duration Code Owners
TestEngineWithHardcodedWorkflow 0.00% true false false 3 0 3 0 github.com/smartcontractkit/chainlink/v2/core/services/workflows true 0s @smartcontractkit/keystone

Artifacts

For detailed logs of the failed tests, please refer to the artifact failed-test-results-with-logs.json.

@justinkaseman justinkaseman changed the title Workflow Engine Rate Limiter [CAPPL-403] Workflow Engine Rate Limiter Jan 22, 2025
Copy link
Contributor

Flakeguard Summary

Ran new or updated tests between develop and b8c4baa (CAPPL-403).

View Flaky Detector Details | Compare Changes

Found Flaky Tests ❌

Name Pass Ratio Panicked? Timed Out? Race? Runs Successes Failures Skips Package Package Panicked? Avg Duration Code Owners
TestEngine_CustomComputePropagatesBreaks 0.00% false false false 3 0 3 0 github.com/smartcontractkit/chainlink/v2/core/services/workflows false 32.303333333s @smartcontractkit/keystone
TestEngine_WithCustomComputeStep 0.00% false false false 3 0 3 0 github.com/smartcontractkit/chainlink/v2/core/services/workflows false 39.2s @smartcontractkit/keystone

Artifacts

For detailed logs of the failed tests, please refer to the artifact failed-test-results-with-logs.json.

Copy link
Contributor

Flakeguard Summary

Ran new or updated tests between develop and 5896f80 (CAPPL-403).

View Flaky Detector Details | Compare Changes

Found Flaky Tests ❌

Name Pass Ratio Panicked? Timed Out? Race? Runs Successes Failures Skips Package Package Panicked? Avg Duration Code Owners
TestEngine_CustomComputePropagatesBreaks 0.00% false false false 3 0 3 0 github.com/smartcontractkit/chainlink/v2/core/services/workflows false 29.966666666s @smartcontractkit/keystone
TestEngine_WithCustomComputeStep 0.00% false false false 3 0 3 0 github.com/smartcontractkit/chainlink/v2/core/services/workflows false 35.896666666s @smartcontractkit/keystone

Artifacts

For detailed logs of the failed tests, please refer to the artifact failed-test-results-with-logs.json.

Copy link
Contributor

Flakeguard Summary

Ran new or updated tests between develop and ca9fe40 (CAPPL-403).

View Flaky Detector Details | Compare Changes

Found Flaky Tests ❌

Name Pass Ratio Panicked? Timed Out? Race? Runs Successes Failures Skips Package Package Panicked? Avg Duration Code Owners
TestEngine_CustomComputePropagatesBreaks 0.00% false false false 3 0 3 0 github.com/smartcontractkit/chainlink/v2/core/services/workflows false 32.766666666s @smartcontractkit/keystone
TestEngine_WithCustomComputeStep 0.00% false false false 3 0 3 0 github.com/smartcontractkit/chainlink/v2/core/services/workflows false 39.3s @smartcontractkit/keystone

Artifacts

For detailed logs of the failed tests, please refer to the artifact failed-test-results-with-logs.json.

Copy link
Contributor

Flakeguard Summary

Ran new or updated tests between develop and aceb93d (CAPPL-403).

View Flaky Detector Details | Compare Changes

Found Flaky Tests ❌

Name Pass Ratio Panicked? Timed Out? Race? Runs Successes Failures Skips Package Package Panicked? Avg Duration Code Owners
TestEngine_CustomComputePropagatesBreaks 0.00% false false false 3 0 3 0 github.com/smartcontractkit/chainlink/v2/core/services/workflows false 30.523333333s @smartcontractkit/keystone
TestEngine_WithCustomComputeStep 0.00% false false false 3 0 3 0 github.com/smartcontractkit/chainlink/v2/core/services/workflows false 37.013333333s @smartcontractkit/keystone

Artifacts

For detailed logs of the failed tests, please refer to the artifact failed-test-results-with-logs.json.

@cedric-cordenier cedric-cordenier added this pull request to the merge queue Jan 22, 2025
Merged via the queue into develop with commit c54d23d Jan 22, 2025
175 of 177 checks passed
@cedric-cordenier cedric-cordenier deleted the CAPPL-403 branch January 22, 2025 15:05
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