You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
remove RX as the primary pipe for gRPC communications (#8281)
### Issue describing the changes in this PR
resolves#8280; performance locally is a 5x+ speedup in throughput
the main crux of the new flow is described in src/WebJobs.Script.Grpc/Eventing/GrpcEventExtensions.cs, but in short: we establish a per-worker `Channel<InboundGrpcEvent>` and `Channel<OutboundGrpcEvent>` to handle the backlog; instead of publishing to RX, we publish to the writer of the relevant queue. Separately, we have an async worker deque data from the queues, and process accordingly. This is much more direct, avoids a *lot* of RX machinery, and creates isolation between workers.
### Pull request checklist
* [ ] My changes **do not** require documentation changes
* [ ] Otherwise: Documentation issue linked to PR
* [ ] My changes **should not** be added to the release notes for the next release
* [ ] Otherwise: I've added my notes to `release_notes.md`
* [ ] My changes **do not** need to be backported to a previous version
* [ ] Otherwise: Backport tracked by issue/PR #issue_or_pr
* [ ] I have added all required tests (Unit tests, E2E tests)
<!-- Optional: delete if not applicable -->
### Additional information
Additional PR information
Co-authored-by: Lilian Kasem <[email protected]>
Co-authored-by: Marc Gravell <[email protected]>
Co-authored-by: Nick Craver <[email protected]>
Co-authored-by: Nick Craver <[email protected]>
// WriteAsync only allows one pending write at a time, so we
69
-
// serialize access to the stream for each subscription
70
-
await_writeLock.WaitAsync();
71
-
awaitresponseStream.WriteAsync(evt.Message);
64
+
_logger.LogTrace("Received invocation response for invocationId: {invocationId} from workerId: {workerId}",currentMessage.InvocationResponse.InvocationId,workerId);
_logger.LogTrace("Received invocation response for invocationId: {invocationId} from workerId: {workerId}",currentMessage.InvocationResponse.InvocationId,workerId);
0 commit comments