Skip to content

feat: Add rate-limits to the API #848

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

Merged
merged 1 commit into from
Apr 4, 2022
Merged

feat: Add rate-limits to the API #848

merged 1 commit into from
Apr 4, 2022

Conversation

kylecarbs
Copy link
Member

Closes #285.

@kylecarbs kylecarbs requested a review from johnstcn April 4, 2022 14:25
@kylecarbs kylecarbs self-assigned this Apr 4, 2022
@codecov
Copy link

codecov bot commented Apr 4, 2022

Codecov Report

Merging #848 (9ef4741) into main (8e56830) will increase coverage by 0.02%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##             main     #848      +/-   ##
==========================================
+ Coverage   65.84%   65.87%   +0.02%     
==========================================
  Files         202      203       +1     
  Lines       13209    13235      +26     
  Branches       87       87              
==========================================
+ Hits         8697     8718      +21     
- Misses       3622     3628       +6     
+ Partials      890      889       -1     
Flag Coverage Δ
unittest-go- 65.42% <100.00%> (+0.15%) ⬆️
unittest-go-macos-latest 52.54% <100.00%> (+0.11%) ⬆️
unittest-go-ubuntu-latest 55.16% <100.00%> (+0.18%) ⬆️
unittest-go-windows-2022 51.80% <100.00%> (+0.03%) ⬆️
unittest-js 62.63% <ø> (ø)
Impacted Files Coverage Δ
coderd/coderd.go 96.68% <100.00%> (+0.20%) ⬆️
coderd/httpmw/ratelimit.go 100.00% <100.00%> (ø)
provisionersdk/serve.go 35.13% <0.00%> (-8.11%) ⬇️
cli/cliui/agent.go 77.19% <0.00%> (-5.27%) ⬇️
provisioner/echo/serve.go 54.40% <0.00%> (-2.40%) ⬇️
cli/cliui/provisionerjob.go 76.42% <0.00%> (-2.15%) ⬇️
coderd/provisionerdaemons.go 59.52% <0.00%> (-1.02%) ⬇️
peerbroker/proxy.go 57.55% <0.00%> (-0.59%) ⬇️
peer/conn.go 80.96% <0.00%> (+0.25%) ⬆️
provisionerd/provisionerd.go 80.61% <0.00%> (+0.29%) ⬆️
... and 2 more

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 8e56830...9ef4741. Read the comment docs.

Copy link
Member

@johnstcn johnstcn left a comment

Choose a reason for hiding this comment

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

We might end up hitting 8.5 req/second soon enough depending on how request-happy the UI gets, but we can bump it if need be.

@kylecarbs kylecarbs merged commit 3153618 into main Apr 4, 2022
@kylecarbs kylecarbs deleted the ratelimit branch April 4, 2022 22:32
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.

Implement rate-limiting of APIs
2 participants