-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix bidi stream blocking naive proxy setup causes. (#143)
There was an assumption we could blast N start streams down and then loop reading responses. In practice this works until about 2k starts. At that point the remote server has sent enough responses that it will now block sending back. The server requires the client to clear its response queue as it won't buffer infinitely to avoid scaling issues. As a result we deadlock around ~2k+ start streams. Solve this by moving Send/Recv into separate go routines since the state they are modifying is disjoint. We need to send N starts and then we're done. We need to get back N replies but they aren't correlated past that. Add some logging at the end so debugging is easier since Send can return EOF and means "the error is on the Recv side".
- Loading branch information
1 parent
6cd231d
commit eb25183
Showing
1 changed file
with
115 additions
and
83 deletions.
There are no files selected for viewing
This file contains 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