grpc / grpc/grpc-rust

Removing unavailable endpoints from a balance channel

Open
#1,552 0 comments 2 reactions 0 assignees View on GitHub
Dominant language
Rust
Stars
12.5k
Forks
1.3k
Avg merge
4d 7h
Merged PRs (30d)
24

Description

## Feature Request

### Crates

I suspect this is related to the transport module so this change would belong in the `tonic` crate?

### Motivation

This is somewhat related to https://github.com/hyperium/tonic/issues/643. Implementing the suggestion in this issue almost works, but the error given when an endpoint is unavailable is insufficient to complete the implementation. `Status` appears to contain the following in my case: `Status { code: Unavailable, message: "error trying to connect: tcp connect error: Connection refused (os error 111)", source: Some(tonic::transport::Error(Transport, hyper::Error(Connect, ConnectError("tcp connect error", Os { code: 111, kind: ConnectionRefused, message: "Connection refused" })))) }`

Since the error doesn't actually say which endpoint was unavailable, it's not possible to know which endpoint to remove from the channel.

### Proposal

The unavailable endpoint should be a part of the `Status` struct.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.