-
Notifications
You must be signed in to change notification settings - Fork 90
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
KBS/perf: promote the concurrency performance of KBS
Currently we are using a global Mutex to protect the only one attestation service client from unsafe thread sync & send. This brings performance bottle neck. This commit brings some optimization to promote the performance and stability. 1. Abondon the global Mutex of the attestation service and change the API definition of Attest to non-mut. This would let the developers to handle the concurrency safe inside the concrete attestation-service inside. In this way, we prevent to lock the whole process logic. 2. Bring in a gRPC client pool to grpc-coco-as mode. This will help to avoid errors that caused by runing out all the temporaty ports provided by OS. 3. Replace the Mutex of session map with a concurrency-safe HashMap to avoid bottle neck. Fixes #256 Signed-off-by: Xynnn007 <[email protected]> Signed-off-by: Biao Lu <[email protected]>
- Loading branch information
Showing
13 changed files
with
268 additions
and
103 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,3 +3,4 @@ insecure_api = true | |
|
||
[grpc_config] | ||
as_addr = "http://127.0.0.1:50004" | ||
pool_size = 200 |
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
Oops, something went wrong.