-
Notifications
You must be signed in to change notification settings - Fork 1.6k
feat: Add graceful shutdown timer to GRPC frontend #7969
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
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
krishung5
reviewed
Jan 27, 2025
tanmayv25
reviewed
Jan 27, 2025
… mwittwer/gRPC-shutdown-timer
krishung5
reviewed
Mar 4, 2025
krishung5
reviewed
Mar 5, 2025
…rence-server/server into mwittwer/gRPC-shutdown-timer
indrajit96
reviewed
Mar 10, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- Let's create a TEP for this as discussed.
- Test a simple no-model perf with and without changes to see if any perf regression was introduced
…o mwittwer/gRPC-shutdown-timer
indrajit96
reviewed
Mar 25, 2025
pskiran1
reviewed
Apr 9, 2025
indrajit96
approved these changes
Apr 24, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, make sure you attach perf numbers to the ticket and the update the latest CI pipeline on the reviews thread.
Nice work!
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What does the PR do?
This PR adds a shutdown timer to the gRPC endpoint for both infer and streaming infer requests. Inflight requests will be allowed to complete before the timer expires and new requests made after shutdown has started will be rejected.
Checklist
<commit_type>: <Title>
Commit Type:
Check the conventional commit type
box here and add the label to the github PR.
Related PRs:
N/A
Where should the reviewer start?
Start with the new functions in src/grpc/grpc_server.cc and the flow in src/main.cc
GracefulStop();
unload the models in core
Stop();
Test plan:
Review L0_lifecycle and grpc related tests.
Updated shutdown behavior changes the tested responses for some lifecycle tests
Caveats:
The updated shutdown process includes three responses. The CANCELLED state cannot be removed as it is part of the GRPC endpoint shutdown behavior:
Background
Shutdown behavior for the gRPC endpoint could lead to unexpected errors when unloading the models from the core
Related Issues: (use one of the action keywords Closes / Fixes / Resolves / Relates to)
N/A