Replies: 11 comments 3 replies
-
You can do this pretty trivially with tap, no reason to write a plugin for the proxy. |
Beta Was this translation helpful? Give feedback.
-
great. would you share more information about tap and how this can be achieved with it please? |
Beta Was this translation helpful? Give feedback.
-
I looked at documenation of tap, I cannot find a way to output its data to a channel. Seems it is designed to debug LinkerD. |
Beta Was this translation helpful? Give feedback.
-
You can either:
I would recommend going the gRPC route first, which would obviously allow you to consume the data with a channel. AFAIK there's no one who's integrated with that API, so you'll want to look through the linkerd codebase, in particular the web service and CLI. |
Beta Was this translation helpful? Give feedback.
-
Do you guys have some code sample or even a documentation of this gRPC streaming API? |
Beta Was this translation helpful? Give feedback.
-
or please at least give a pointer to the source code of this API. :) |
Beta Was this translation helpful? Give feedback.
-
Thanks @grampelberg! |
Beta Was this translation helpful? Give feedback.
-
I'm going to rename the title of this issue. Currently, the Linkerd proxy doesn't support a plugin model. I also don't think a proxy plugin is the right approach - which proxy will be responsible for sending out the notification if the workload replicas count is 0? Are the requests being queued somewhere while the replicas are being scaled up? What if the replicas take longer time to come up? |
Beta Was this translation helpful? Give feedback.
-
@grampelberg, does tap service track failed requests? I tried 'linkerd tap -n test-host deploy/test-frontend' in our system, and I found if backend pods scale down to 0 replica, tap will not show any event, even the frontend still tries to send request (for sure they fail). Does tap service only track successful requets? I need the signal from the failed requests as that is how zeroscaler service knows it needs to scale up the backend deployment. |
Beta Was this translation helpful? Give feedback.
-
Yes, it tracks failed requests. I'm surprised that you're not seeing
something, if you provide us with a YAML that replicates the behavior we
can take a look.
…On Thu, Aug 20, 2020 at 8:01 PM susanhuhu ***@***.***> wrote:
@grampelberg <https://github.com/grampelberg>, does tap service track
failed requests? I tried 'linkerd tap -n test-host deploy/test-frontend' in
our system, and I found if backend pods scale down to 0 replica, tap will
not show any event, even the frontend still tries to send request (for sure
they fail). Does tap service only track successful requets? I need the
signal from the failed requests as that is how zeroscaler service knows it
needs to scale up the backend deployment.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#4830 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAALW6CIKHJLS5U2RWPAOR3SBXIOBANCNFSM4PVXJYHQ>
.
|
Beta Was this translation helpful? Give feedback.
-
Feature Request
What problem are you trying to solve?
We have a zeroscaler service, which needs to scale up a service from 0 replica as soon as there is a reqeust coming in. One way to achieve this is to rely on prometheus metrics to check if there is request coming in, which always has some delay. We then developed a notification mode in our grpc load balancer solution, so whenever there is a request coming in, while the dst deployment has 0 replica, the load balancer will send out a notifcation. Now we are trying to use LinkerD, wondering if there is an easy way to achieve this notification functionality by writing a proxy plug in. So when LinkerD tries to find a dst deployment's pod to send request, but get 0 result back, it will send out a notification to a redis pubsub channel ( or other places like event hub).
How should the problem be solved?
Allowing customized plugin to the proxy, which will trigger notification on request coming in.
Any alternatives you've considered?
Cannot find an alternative solution with exiting LinkerD.
How would users interact with this feature?
Our zeroscaler service can consume the notification and trigger corresponding deployment to scale up immediately.
Beta Was this translation helpful? Give feedback.
All reactions