-
Notifications
You must be signed in to change notification settings - Fork 8.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[FAB-6017] enable GRPC keepalive on chaincode
Link level disconnects on the chaincode-peer connection could cause either side to wait indefinitely for the other side to restablish connectivity. This would cause leaks . chaincode container stays up after peer dies . peer holds chaincode handlers after chaincode dies Note that the above condition requires a disconnect to happen before the containers go away. Container deaths under normal network connectivity is cleanly detected and cleaned up on either side (which is why we normally don't notice this issue. gRPC keepalive enabled in FAB-4305 provides an elegant solution to this problem. This CR enables client-side keep-alives for chaincode client by setting keepalive.ClientParameters. To contain wide changes, non-chaincode connections are left as is. With this fix chaincode and server send gRPC pings once a min when there's no activity on the connection. Ping failures are detected by gRPC which terminate the connection. This is detected by the higher layers which clean up normally. This should also fix FAB-6333. Another nice side-effect is we may not need the app level KEEPALIVE pings any more. But this can be revisited in future. Change-Id: Icc04391cf114713e464cfd59a6bb4b5dea0a4806 Signed-off-by: Srinivasan Muralidharan <srinivasan.muralidharan99@gmail.com>
- Loading branch information
1 parent
7500e9b
commit 780c31a
Showing
7 changed files
with
120 additions
and
22 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
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
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
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
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
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
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