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

[Feature Request]: Add support to trigger serving functions via gRPC protocol #3040

Open
1 of 3 tasks
dhruva-jasper opened this issue Feb 2, 2023 · 2 comments
Open
1 of 3 tasks

Comments

@dhruva-jasper
Copy link

Feature Type

  • Adding new functionality to MLRun

  • Changing existing functionality in MLRun

  • Removing existing functionality in MLRun

Problem Description

I wish I could invoke the deployed serving function via gRPC instead of HTTP.

Feature Description

The feature implementation would require running a gRPC server inside the serving container similar to described in https://grpc.io/docs/what-is-grpc/introduction/

Alternative Solutions

No alternate solutions.

Additional Context

Code examples are available here:
https://grpc.io/docs/languages/python/basics/

@liranbg
Copy link
Member

liranbg commented Feb 3, 2023

This needs to be addressed first on Nuclio's side. @dhruva-jasper - may I ask the intention here of why using grpc over http? the former must have a pre-defined and agreed schema. the latter is more flexible, easier modify and extend.
What is the gain here? I suppose you are not familiar with Nuclio's (the serving function "engine") architecture here?

@dhruva-jasper
Copy link
Author

We use gRPC for all communications within our company's systems. gRPC has some benefits over HTTP in some situations:

  1. It's faster.

  2. Allows clients to specify deadlines/timeouts.

  3. Assume a system with multiple server instances running behind a Load Balancer. If a sequence of inference requests is needed to hit the same server instance, a GRPC stream will hold a single connection throughout the lifetime and hence ensure the requests are delivered to the same instance.

  4. If the order of requests/responses needs to be preserved over the network, a GRPC stream will ensure that the server receives the requests in the same order as they were sent from the client.

Side note, KServe has a standardized schema for inference using gRPC.

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