Repository navigation
Open fewer connections to rex servers - #3645
Open
peterebden wants to merge 1 commit into
Open
peterebden wants to merge 1 commit into
peterebden wants to merge 1 commit into
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
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.
Also makes the limit of CAS connections configurable.
remote-apis-sdkschanged a while back to eagerly open 25 connections to each server. I think that's fairly antisocial (also generates a lot of noise in our logs) and mostly unnecessary; it seems to be working around an older gRPC bug about what happens if you have a bunch of long-running RPCs on a single connection.It's a bit fiddly because we need to support different possible infrastructure setups:
We then have two different use cases, which currently have the same "always 25" policy, but are actually completely opposite to one another:
ExecuteorWaitExecutioncalls which are very low-bandwidth and much longer-lived. We base this off 1 per 64 workers to try to avoid any of the aforementioned issues with stream limits per connection; this might be a bit defensive possibly but it should be fairly safe.In any case we should end up with significantly fewer connections opened, reducing the load on the client (connections & TLS handshakes) and more notably on the servers.