You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Is there a way to expose multiple ports on a single Knative service #7140
We have a container that exposed http and grpc on two different port. we want to use a single Knative service to map those two ports like the following.
However, with the current validation test, we are only allowed to have one port per Knative service. Is there an other way that can achieve the same use case? Thanks
This is complicated for a variety of reasons, and probably not something we'll support anytime soon (if ever). Most of the reasons that come to mind are networking related so cc @tcnghia
In the meantime, is it possible to multiplex the http handling alongside the GRPC handling?
TensorFlow serving has http and grpc hosted on two different port. They both are used for model prediction but with different protocol.
Both of the ports should be public to all users.
It depends on the model, most of the time the http port will receive restful requests such as Posting JSON formatted data. grpc port will receive data in TensorProto created by TensorFlow.
We are planning to scale based on the number of concurrent requests or cpu/gpu consumption.
Issues go stale after 90 days of inactivity.
Mark the issue as fresh by adding the comment /remove-lifecycle stale.
Stale issues rot after an additional 30 days of inactivity and eventually close.
If this issue is safe to close now please do so by adding the comment /close.
Activity
vagababov commentedon Mar 4, 2020
Can you describe the use case?
Tomcli commentedon Mar 4, 2020
We have a container that exposed http and grpc on two different port. we want to use a single Knative service to map those two ports like the following.
However, with the current validation test, we are only allowed to have one port per Knative service. Is there an other way that can achieve the same use case? Thanks
vagababov commentedon Mar 4, 2020
/cc @mattmoor @evankanderson @dprotaso
mattmoor commentedon Mar 5, 2020
This is complicated for a variety of reasons, and probably not something we'll support anytime soon (if ever). Most of the reasons that come to mind are networking related so cc @tcnghia
In the meantime, is it possible to multiplex the http handling alongside the GRPC handling?
dprotaso commentedon Mar 5, 2020
@Tomcli can you comment on the specifics of your workload
I'm curious about the following:
Tomcli commentedon Mar 5, 2020
Hi @dprotaso, one of our use cases is to use tensorflow serving on Knative.
Below are the answers to your questions:
dprotaso commentedon Mar 5, 2020
Is this scaling on the number of concurrent requests tied to a specific port?
dprotaso commentedon Mar 5, 2020
If it's a matter of a different protocols you could run two separate Knative Services.
mattmoor commentedon Mar 5, 2020
Can GRPC not multiplex the GRPC handlers alongside non-GRPC http/2 handlers?
dprotaso commentedon Mar 5, 2020
It requires some work and is language specific
We use it in our tests
serving/test/test_images/grpc-ping/main.go
Lines 80 to 88 in fd25321
serving/vendor/knative.dev/pkg/network/h2c.go
Lines 29 to 36 in fd25321
@Tomcli that's the other option worth exploring - then you'd have the expected behaviour you want with a single port
Tomcli commentedon Mar 5, 2020
Thanks @dprotaso, we will try to explore these options and see can it fit in our scenario.
dprotaso commentedon Apr 8, 2020
cc @tcnghia @evankanderson
dprotaso commentedon Apr 8, 2020
This topic came up at the API WG meeting (2020-04-08) see notes & recording here
knative-housekeeping-robot commentedon Jul 8, 2020
Issues go stale after 90 days of inactivity.
Mark the issue as fresh by adding the comment
/remove-lifecycle stale.Stale issues rot after an additional 30 days of inactivity and eventually close.
If this issue is safe to close now please do so by adding the comment
/close.Send feedback to Knative Productivity Slack channel or file an issue in knative/test-infra.
/lifecycle stale
mattmoor commentedon Jul 8, 2020
/remove-lifecycle stale
mattmoor commentedon Aug 17, 2020
Consolidating these under: #8471