-
Notifications
You must be signed in to change notification settings - Fork 156
Use DaemonSet by default instead of sidecar #74
Comments
It's important to note that using a Service with a DaemonSet does not send the traffic only to the local Pod:
Considering the Jaeger Agent receives UDP traffic, it's important to consider that and use the NodeIP and a known NodePort. |
Why mix Service and DaemonSet? Can't the latter be defined without being a Service? |
Yes DaemonSet can (and should in this case) be used without a Service! I'm just pointing out that the client library cannot send the traces to the Jaeger Agent using
One could easily be tempted to create a Service over the DaemonSet to have a consistent name like |
we should probably have docs pointing this out. E.g. this repo is for k8s templates for running Jaeger itself, but we could also have a section on setup of the applications. |
I belive its clear that we send UDP packet over network if we deploy "Jaeger Agent" as a daemonset. But at same time if we deploy it as a sidecar, we need to think about Compute Resources & cost affected based on this kind of implementation. Even now, I am not clear about correct approach apparently. We have a plan to use Jaeger on K8s, we would really appreciate if you guys can come up with final solution towards deployment. |
One reason to use sidecar might be scaling. I am not sure if deamonset can scale up pods. |
I cannot give an authoritative advice for kubernetes because we don't use it at Uber. We designed the agent to be run as a daemon (one per physical host). It was not meant to be run as a side car (one per pod), because there are no perf benefits to it (apparently there's a config benefit on k8s), but there are downsides, such as exploding the number of connections to collectors. |
The solution proposed by @ledor473 looks good (workaround for not being able to reach |
Hi, it would not be good idea to scale daemonset on K8s. Do we really need to scale agent on a Node? I believe if it is daemon set, every application running on that Node can use it. Only problem is "if we have a single daemon set, does it have any bandwidth overhead/performance impacts and also configuration impacts(This is really important when we have plenty of Apps which need different configuration on Agent, will this work)". Two advantages I see as a DaemonSet are "1. No additional Compute Resources saves me cost 2. Daemonset can be used for full stack tracing i.e Application + K8s" @yurishkuro Could you please let us know your views. I just started with Jaeger, not an expert. Thanks! |
@tejaswiniVadlamudi To be clear, I don't think either solution are bad. They both need a change to each and every Deployment to be working correctly (but it could be fixed by an Admission Controller):
Depending on how you manage your Deployment, maybe one change is easier than the other? Otherwise, you effectively just trade the isolation of a sidecar (a bad actor can only impact it's own Jaeger Agent) with the lower resources usage of a DaemonSet |
Also @pieterlange Is there any proposal document from your side to deploy agent as a sidecar? |
The reasoning for this change was explained here: https://medium.com/jaegertracing/deployment-strategies-for-the-jaeger-agent-1d6f91796d09 Basically, both scenarios (DaemonSet, SideCar) are supported, it only depends on what your requirements are. If you have a multi tenant setup, for instance, you might want to have each pod to have its agent, so that each agent knows where to send the collected spans to. On a daemon set, the agent will send all spans collected by all pods running on that node to a single backend. |
@jpkrohling wouldn't you agree that the prevailing use case for most orgs is a single tenancy deployment? I think the templates should reflect that. Ideally the template would be parameterized to support both the daemon set and the side car deployments, defaulting to the former. It's also worth mentioning that for multi-tenant deployments the side car approach is not the golden solution either, more like a current workaround, so I'm quite sympathetic with the users who find it confusing that the template defaults to that mode. |
I think the default usecase will be single-tenant clusters.. the sidecar scenario is fine too but should probably be configured using pod presets (https://kubernetes.io/docs/concepts/workloads/pods/podpreset/) so users don't have to modify their deployments. |
I sincerely do not know what would be the most common case. Based on my experience with OpenShift, I have guessed that multiple Jaeger installations would exist under the same Kubernetes cluster, but if one installation is the common scenario, I have no problems at all changing the template. I have added this to my queue and will be working on it soon!
Thanks for the tip about pod presets. I wasn't aware of it! Is it new? |
@pieterlange : would you be willing to contribute with a For instance: I have read the doc about For now, I'm just reverting then the change I made when I removed the |
I'm not using jaeger yet, but when i do i'll make a pull request to cover multiple usecases. (Daemonset, pod preset, ??) |
I'm working on the |
Signed-off-by: Juraci Paixão Kröhling <[email protected]>
@pieterlange, could you test/review this PR: #75 ? |
Sure. |
Signed-off-by: Juraci Paixão Kröhling <[email protected]>
Signed-off-by: Juraci Paixão Kröhling <[email protected]>
Signed-off-by: Juraci Paixão Kröhling <[email protected]>
In case of DaemonSet - How to secure nodePort connections from outside of cluster? |
@RouR that would be part of your deployment architecture and you'd probably have appropriate firewall rules in place. |
Hello,
Just curious to know the reasons & advantages of using Jaeger agent as a side car instead Daemon set.
Many Thanks,
Teja
The text was updated successfully, but these errors were encountered: