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

Rate limit processor #22883

Merged
merged 53 commits into from
Dec 12, 2020
Merged
Changes from 1 commit
Commits
Show all changes
53 commits
Select commit Hold shift + click to select a range
b4c068c
Implement basic scaffolding for rate_limit processor
ycombinator Dec 3, 2020
2400b67
Fixing import cycle
ycombinator Dec 3, 2020
b9028cd
Adding skeleton for token bucket algo
ycombinator Dec 3, 2020
dce6dae
Set default algorithm in default config
ycombinator Dec 7, 2020
ca41a82
Using an algo constructor
ycombinator Dec 7, 2020
fb960e5
Implement token bucket rate limiting algorithm
ycombinator Dec 7, 2020
80a37f8
Resolving some TODOs
ycombinator Dec 7, 2020
8b550d3
Adding license header
ycombinator Dec 7, 2020
bff5ee7
Removing old TODO comment
ycombinator Dec 7, 2020
752ff9c
Adding tests
ycombinator Dec 7, 2020
028b67a
Reverting to previous logic
ycombinator Dec 7, 2020
d08d9a6
Adding CHANGELOG entry
ycombinator Dec 7, 2020
0a6b0cd
Adding TODOs for more tests
ycombinator Dec 7, 2020
c9852c9
Fixing comment
ycombinator Dec 7, 2020
1fb20e3
Fixing error messages
ycombinator Dec 7, 2020
8e8a204
Fixing comment
ycombinator Dec 7, 2020
dfc5907
Fleshing out godoc comments
ycombinator Dec 7, 2020
fa63dbb
Fixing logger location
ycombinator Dec 7, 2020
189a170
Fixing up docs a bit
ycombinator Dec 7, 2020
1e0c6ec
Adding test for "fields" config
ycombinator Dec 7, 2020
8639e3b
WIP: adding test for burst multiplier
ycombinator Dec 7, 2020
a9faa7e
Return pointer to bucket from getBucket
ycombinator Dec 8, 2020
193cb1f
Keep pointers to buckets in map to avoid map reassignment
ycombinator Dec 8, 2020
7597c67
Fix test
ycombinator Dec 8, 2020
f918076
Fix logic as we cannot allow withdrawal of fractional (<1) tokens
ycombinator Dec 8, 2020
ae35015
Move burst multiplier default to token_bucket algo
ycombinator Dec 8, 2020
1a17229
Implementing GC
ycombinator Dec 8, 2020
44c31e4
Making the factory take the algo config and return the algo
ycombinator Dec 8, 2020
c3be265
Reduce nesting level
ycombinator Dec 8, 2020
56e4731
Use mitchellh/hashstructure
ycombinator Dec 8, 2020
ae8874b
Using sync.Map
ycombinator Dec 8, 2020
900019c
Removing algorithm and algorithm options from documentation
ycombinator Dec 8, 2020
58124f5
Mocking clock
ycombinator Dec 8, 2020
eb81d13
Adding license headers
ycombinator Dec 8, 2020
742ed41
Using atomic.Uints for metrics counters
ycombinator Dec 8, 2020
b4990a0
Fixing logic
ycombinator Dec 8, 2020
40e1382
Use github.com/jonboulle/clockwork
ycombinator Dec 8, 2020
a220fbf
Running make update
ycombinator Dec 8, 2020
4b53054
Add mutex to prevent only one GC thread from running at any time
ycombinator Dec 9, 2020
c36b186
Adding logging
ycombinator Dec 10, 2020
c89ecca
Remove NumBuckets GC threshold
ycombinator Dec 10, 2020
425b03a
Use non-blocking mutex
ycombinator Dec 10, 2020
e10a73d
Perform actual GC in own goroutine
ycombinator Dec 10, 2020
91493ba
Running mage fmt
ycombinator Dec 10, 2020
c957161
Fixing processor name
ycombinator Dec 10, 2020
3f4b800
Importing rate limit processor
ycombinator Dec 10, 2020
84c4f74
Initialize mutex
ycombinator Dec 10, 2020
ac6343b
Do not register as a JS processor
ycombinator Dec 10, 2020
00251a8
Remove unused field
ycombinator Dec 10, 2020
a3ce476
Mark processor as beta
ycombinator Dec 10, 2020
5125748
Renaming package
ycombinator Dec 10, 2020
0ffcd7d
Flatenning package hierarchy
ycombinator Dec 10, 2020
2b92955
Remove SetClock from algorithm interface
ycombinator Dec 10, 2020
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Fixing processor name
  • Loading branch information
ycombinator committed Dec 11, 2020
commit c957161e8ce20561d76e4de351724ee396ed2653
2 changes: 1 addition & 1 deletion libbeat/processors/rate_limit/rate_limit.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ import (

func init() {
processors.RegisterPlugin("rate_limit", New)
jsprocessor.RegisterPlugin("Fingerprint", New)
jsprocessor.RegisterPlugin("RateLimit", New)
}

const processorName = "rate_limit"
Expand Down