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

feat: add concurrency limit for grpc server #982

Merged
merged 1 commit into from
Feb 14, 2025
Merged

Conversation

gaius-qi
Copy link
Member

@gaius-qi gaius-qi commented Feb 14, 2025

Description

This pull request introduces new rate limiting features for the download and upload gRPC servers in the dragonfly-client-config and makes associated updates to the dragonfly-client codebase. The most important changes include adding default rate limits, updating server structures to include these limits, and incorporating the ServiceBuilder to apply concurrency limits and load shedding.

Rate Limiting Features:

  • dragonfly-client-config/src/dfdaemon.rs: Added functions default_download_request_rate_limit and default_upload_request_rate_limit to define default rate limits for download and upload requests. Updated DownloadServer and UploadServer structs to include request_rate_limit fields with default values. [1] [2] [3] [4] [5]

Dependency Updates:

Codebase Updates:

Related Issue

dragonflyoss/dragonfly#3811

Motivation and Context

Screenshots (if appropriate)

@gaius-qi gaius-qi added the enhancement New feature or request label Feb 14, 2025
@gaius-qi gaius-qi added this to the v2.3.0 milestone Feb 14, 2025
@gaius-qi gaius-qi self-assigned this Feb 14, 2025
@gaius-qi gaius-qi requested a review from a team as a code owner February 14, 2025 09:49
Copy link

codecov bot commented Feb 14, 2025

Codecov Report

Attention: Patch coverage is 88.88889% with 1 line in your changes missing coverage. Please review.

Project coverage is 33.12%. Comparing base (991ecd3) to head (2559da1).
Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
dragonfly-client/src/bin/dfdaemon/main.rs 0.00% 1 Missing ⚠️
Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #982      +/-   ##
==========================================
+ Coverage   33.07%   33.12%   +0.05%     
==========================================
  Files          59       59              
  Lines        9741     9750       +9     
==========================================
+ Hits         3222     3230       +8     
- Misses       6519     6520       +1     
Files with missing lines Coverage Δ
dragonfly-client-config/src/dfdaemon.rs 49.89% <100.00%> (+0.81%) ⬆️
dragonfly-client/src/grpc/dfdaemon_download.rs 0.00% <ø> (ø)
dragonfly-client/src/grpc/dfdaemon_upload.rs 0.00% <ø> (ø)
dragonfly-client/src/bin/dfdaemon/main.rs 0.00% <0.00%> (ø)

@gaius-qi gaius-qi merged commit d0fa28a into main Feb 14, 2025
6 checks passed
@gaius-qi gaius-qi deleted the feature/grpc-limit branch February 14, 2025 10:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants