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(server): Remove concurrency limit built in feature #1973

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from
Draft
Changes from all commits
Commits
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
4 changes: 4 additions & 0 deletions tonic/src/transport/server/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -173,6 +173,10 @@ impl<L> Server<L> {
/// builder.concurrency_limit_per_connection(32);
/// ```
#[must_use]
#[deprecated(
since = "0.12.4",
note = "Use `layer()` with a layer which provide concurrency limit feature such as `tower::limit::ConcurrencyLimitLayer` used in this config."
Copy link
Contributor

Choose a reason for hiding this comment

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

I don't think that will provide 'per connection' concurrency-limiting semantics like this purports to.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Makes sense. Seems necessary to add functionality to set layers for the purpose.

Copy link
Contributor

@shikhar shikhar Oct 5, 2024

Choose a reason for hiding this comment

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

I think that would be helpful, see e.g. #1616

(interpreting your comment as: purpose == per connection)

)]
pub fn concurrency_limit_per_connection(self, limit: usize) -> Self {
Server {
concurrency_limit: Some(limit),
Expand Down