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(userspace/falco)!: make output rate limiter optional and output engine explicitly thread-safe #2139

Merged
merged 6 commits into from
Aug 23, 2022

Conversation

jasondellaluce
Copy link
Contributor

@jasondellaluce jasondellaluce commented Jul 21, 2022

What type of PR is this?

/kind feature

Any specific area of the project related to this PR?

/area engine

What this PR does / why we need it:

This is an alternative to #2080, that makes the token-bucket alert rate limiter optional by default. When enabled, the output framework now uses one token bucket for each inspector. Once we have multi-source support, alerts coming from one source won't influence the rate limiting of the others. At the same time, this will also be thread-safe because each thread will be own its own token bucket.

Which issue(s) this PR fixes:

Fixes #1333

Special notes for your reviewer:

Does this PR introduce a user-facing change?:

refactor(userspace/falco): make output rate limiter optional and output engine explicitly thread-safe
update(falco.yaml)!: notification rate limiter disabled by default.

@jasondellaluce
Copy link
Contributor Author

/milestone 0.33.0

@poiana poiana added this to the 0.33.0 milestone Jul 22, 2022
Signed-off-by: Jason Dellaluce <jasondellaluce@gmail.com>
Signed-off-by: Jason Dellaluce <jasondellaluce@gmail.com>
Signed-off-by: Jason Dellaluce <jasondellaluce@gmail.com>
Signed-off-by: Jason Dellaluce <jasondellaluce@gmail.com>
Signed-off-by: Jason Dellaluce <jasondellaluce@gmail.com>
…work

Signed-off-by: Jason Dellaluce <jasondellaluce@gmail.com>
@jasondellaluce jasondellaluce force-pushed the refactor/token-bucket-thread-safe branch from decb74d to 65655c5 Compare August 10, 2022 15:19
@jasondellaluce jasondellaluce changed the title refactor(userspace/falco): make output rate limiter optional and output engine explicitly thread-safe refactor(userspace/falco)!: make output rate limiter optional and output engine explicitly thread-safe Aug 22, 2022
@leogr
Copy link
Member

leogr commented Aug 22, 2022

/milestone 0.33.0

Copy link
Member

@leogr leogr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

I prefer this over #2080

/approve

@poiana
Copy link
Contributor

poiana commented Aug 23, 2022

LGTM label has been added.

Git tree hash: 341e5162d6db27c76885884773d44ff10a2ab958

Copy link
Contributor

@FedeDP FedeDP left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Left a minor comment :) it LGTM!
/approve

# rate of falco notifications. This throttling is controlled by the following configuration
# options:
# rate of Falco notifications. One rate limiter is assigned to each event
# source, so that alerts coming from one can't influence the throttling
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We are already talking about multiple event sources; isn't it premature here? :D

@poiana
Copy link
Contributor

poiana commented Aug 23, 2022

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: FedeDP, jasondellaluce, leogr

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:
  • OWNERS [FedeDP,jasondellaluce,leogr]

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@poiana poiana merged commit e750243 into master Aug 23, 2022
@poiana poiana deleted the refactor/token-bucket-thread-safe branch August 23, 2022 13:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

The outputs throttling mechanism skips notifications without any notice
4 participants