Does ZeroScaler works with Grpc Services (deployed on Pod) ?
gautammoulik opened this issue · 3 comments
Environment summary
K8s Master Info (e.g. AKS, ACS, Bare Metal, EKS)
AKS
Osiris Version
latest
Install Method (e.g. k8s YAMLs, Helm Chart)
helm chart
Issue Details
Let me start with, this is not an Issue rather this is a question, I couldn't find a discussion thread/community section where I can ask question. and hence, creating as an issue.
My question is related to functionalities of the "ZeroScaler", as per the comment in the Values.yaml file
[ The interval in which the zeroScaler would repeatedly track the pod http request metrics.
The value is the number of seconds of the interval.
metricsCheckInterval: 150 ]
If we look at the ":repeatedly track the pod http request metrics" part, just to ensure I am on the same page, what if the Pod opens only uses Grpc ....my understanding is since Grpc uses Http 2 underline, ZeroScaler will still be able to track the Grpc requests .... I mean to say if the Pod doesn't have a typical REST service but it has a Grpc Service, the ZeroScaler will still work ....is my understanding correct ?
Or does ZeroScaler will not work if the Pod has a Grpc service ... please confirm.
The short answer is no.
A more detailed answer:
There are two components of Osiris that act as proxies for your Osiris-enabled application. The first is the metrics-collecting sidecar proxy. The second is the activator component that receives requests on behalf of Osiris-enabled applications that have been scaled to zero. This component initiates a scale-from-one event and forward the request to the newly activated application (and forwards the response back to the client)...
These proxies are both L7 and strictly support HTTP (for now). Practically speaking, gRPC requires the use of HTTP2. Granted, Go HTTP servers have had built-in support for HTTP2 for quite some time now, but given our current implementation, I don't believe our proxies actually do support HTTP2-- nevermind gRPC. Another consideration is that HTTP2 does not strictly require TLS, but practically speaking, TLS is considered a de facto requirement for HTTP2 (and therefore gRPC). Neither of the proxies described above supports TLS for the moment, for the simple reason that an L7 proxy that supports TLS requires the cert and private key for the target application. Our proxies do not have those, nor should they.
This repository was recently seeded with code from an older, internal repository. There are a handful of issues over there that need to be moved over to this new, public repository. Among those is one that suggests we might be better off implementing L4 proxies. Operating at that level would bypass many of the limitations mentioned above, but it would introduce significant, new challenges. I'll get that issue moved over to this repo today.
I've been looking into how HTTP2, in general, can be supported. It's probably possible without going to the extremes of converting our proxies to TCP proxies, however, the caveat to that would be that this means HTTP/HTTP2/gRPC would only be supported without any SSL support.