-
Notifications
You must be signed in to change notification settings - Fork 4.4k
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
server: always handle streaming RPCs in separate goroutines to optimize serverWorker availability #7558
Conversation
…ze serverWorker availability
The committers listed above are authorized under a signed CLA. |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #7558 +/- ##
==========================================
- Coverage 81.92% 81.77% -0.16%
==========================================
Files 361 361
Lines 27816 27828 +12
==========================================
- Hits 22789 22756 -33
- Misses 3838 3869 +31
- Partials 1189 1203 +14
|
@pingkuan thanks for suggestion. I have asked the team for their thoughts on this change |
@pingkuan our suggestion would be to use a signal which identifies long live rpcs instead of restricting to streaming RPCs. |
@purnesh42H Since the package may not be able to determine in advance whether a method will be long-lived, which is typically a decision made by the user during implementation, I suggest offering a server option that allows users to specify which methods should be treated as long-lived and, consequently, should not be handled by the server worker. |
Is there an issue open for this? I feel that it would make sense to open an issue, discuss the options we have, finalize one, and then move on to a PR. |
+1. E.g. I wonder if we can use a |
Streaming RPCs are typically long-lived and can monopolize the serverWorker for extended periods. To prevent this, streaming RPCs should always be handled in a separate goroutine.