rpc: Accept interface in place of ClientConn #98

Merged
fyrchik merged 1 commit from fyrchik/frostfs-api-go:clientconn-interface into master 2024-08-01 11:49:46 +00:00
Owner

gRPC client load-balancing API is ugly as f:

  1. It is configured by pre-registering a balancer and the providing JSON
    configuration.
  2. It doesn't allow different credentials for different endpoints
    (consider using "insecure" localhost and external endpoint).
  3. To support frostfs usecase we also need to implement a resolver,
    which has its own difficulties.
  4. https://github.com/grpc/grpc-go/issues/239#issuecomment-264548415

Using interface in place of grpc.ClientConn allows us to provide custom
implentation for it (load-balancing, circuit breaker etc.).

Refs TrueCloudLab/frostfs-node#1268

Signed-off-by: Evgenii Stratonikov e.stratonikov@yadro.com

gRPC client load-balancing API is ugly as f: 1. It is configured by pre-registering a balancer and the providing JSON configuration. 2. It doesn't allow different credentials for different endpoints (consider using "insecure" localhost and external endpoint). 3. To support frostfs usecase we also need to implement a resolver, which has its own difficulties. 4. https://github.com/grpc/grpc-go/issues/239#issuecomment-264548415 Using interface in place of grpc.ClientConn allows us to provide custom implentation for it (load-balancing, circuit breaker etc.). Refs TrueCloudLab/frostfs-node#1268 Signed-off-by: Evgenii Stratonikov <e.stratonikov@yadro.com>
fyrchik added 1 commit 2024-07-31 12:38:41 +00:00
rpc: Accept interface in place of ClientConn
Some checks failed
DCO action / DCO (pull_request) Failing after 1m17s
Tests and linters / Tests (1.19) (pull_request) Successful in 1m38s
Tests and linters / Tests (1.20) (pull_request) Successful in 1m59s
Tests and linters / Tests with -race (pull_request) Successful in 2m3s
Tests and linters / Lint (pull_request) Successful in 2m25s
ed0a12b8bb
gRPC client load-balancing API is ugly as f:
1. It is configured by pre-registering a balancer and the providing JSON
   configuration.
2. It doesn't allow different credentials for different endpoints
   (consider using "insecure" localhost and external endpoint).
3. To support frostfs usecase we also need to implement a resolver,
   which has its own difficulties.
4. https://github.com/grpc/grpc-go/issues/239#issuecomment-264548415

Using interface in place of grpc.ClientConn allows us to provide custom
implentation for it (load-balancing, circuit breaker etc.).

Signed-off-by: Evgenii Stratonikov <e.stratonikov@yadro.com>
fyrchik force-pushed clientconn-interface from ed0a12b8bb to e092ce4cf8 2024-07-31 12:38:54 +00:00 Compare
fyrchik requested review from storage-core-committers 2024-07-31 12:39:17 +00:00
fyrchik requested review from storage-core-developers 2024-07-31 12:39:20 +00:00
fyrchik requested review from storage-services-committers 2024-07-31 12:39:22 +00:00
fyrchik requested review from storage-services-developers 2024-07-31 12:39:24 +00:00
fyrchik force-pushed clientconn-interface from e092ce4cf8 to 1473fa588f 2024-08-01 05:50:42 +00:00 Compare
dstepanov-yadro approved these changes 2024-08-01 09:08:58 +00:00
fyrchik merged commit 1473fa588f into master 2024-08-01 11:49:46 +00:00
fyrchik deleted branch clientconn-interface 2024-08-01 11:49:58 +00:00
Sign in to join this conversation.
No reviewers
TrueCloudLab/storage-core-developers
TrueCloudLab/storage-services-committers
TrueCloudLab/storage-services-developers
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: TrueCloudLab/frostfs-api-go#98
No description provided.