Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for GRPC proxy #15

Open
troian opened this issue Nov 25, 2024 · 2 comments
Open

Add support for GRPC proxy #15

troian opened this issue Nov 25, 2024 · 2 comments

Comments

@troian
Copy link
Member

troian commented Nov 25, 2024

Extend functionality by proxying the GRPC endpoint.

  1. read a list of available GRPC servers from chain meta file. (check existing RPC proxy config, likely will only need to add GRPC
  2. Live reload of GRPC nodes without the need to restart the server (check existing RPC proxy implementation)
  3. Use existing heuristics of REST proxy to detect unhealthy nodes
  4. The default listen port for the GPRC proxy is 9090
  5. Must support GRPC reflection
  6. Use grpcurl to test
    • grpcurl -plaintext|insecure <host> list to list all available GRPC requests
    • grpcurl -plaintext|insecure <host> describe <query> to test reflection, e.g: grpcurl -plaintext akash.declab.pro:9001 describe akash.audit.v1beta3.Query
@tychoish
Copy link

I presume that 5 (and all of the gRPC specific proxying components) can be taken care of with some extant tooling (e.g. grpc-proxy), and we can do most of 1-3 by (hopefully) making the existing code more generic.

Does that seem like a reasonable approach?

@tychoish
Copy link

tychoish commented Feb 5, 2025

Having dug a bit more into this, it seems plausible (and delightful) that we use the ServeHTTP method on the gRPC server to avoid the added complexity of opening an additional port and managing another high level service.

At the same time, the method is marked as experimental, and may have different/unexpected performance impacts for some clients, so it would bear more experimentation to make sure that this was capable of servicing production requests.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants