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

K8s: implement k8s healthcheck API at Vector for load balancing #2816

Closed
MOZGIII opened this issue Jun 15, 2020 · 4 comments
Closed

K8s: implement k8s healthcheck API at Vector for load balancing #2816

MOZGIII opened this issue Jun 15, 2020 · 4 comments
Labels
meta: idea Anything in the idea phase. Needs further discussion and consensus before work can begin. platform: kubernetes Anything `kubernetes` platform related

Comments

@MOZGIII
Copy link
Contributor

MOZGIII commented Jun 15, 2020

We already have a topology-level health check, which is different.

Kubernetes offers a health check system for pods. It's a contract between the Kubernetes load balancing system and the software running is a Pod - in short, when health check for a Pod fails, the Pod is removed from balancing and the traffic is distributed to other endpoints of a Service that the failing Pod is part of.

It is explained in more detail at #2222.

It doesn't seem like directly exposing the topology healthiness status makes sense as the Kubernetes health check.

I suggest we discuss the possible options here.

In essence, it seems like we don't want to ever remove the Vector Pod from balancing in some use cases (generally speaking - it's always the case in a DaemonSet deployment scenario), but in other cases - like in a Serivce deployment strategy (or, generally, with a Deployment resource) - we might want to remove Vector Pods from balancing because in that use case they probably are acting as a set of processes behind a load balancer.

So, things in question are:

  • do we report health status differently depending on the deployment strategy?
  • how do we detect/specify which mode of health status reporting to use?
  • do we even bother, or just report "healthy" unconditionally and rely on internal protocol-level load balancing?

The decision we make here will likely have implications beyond just k8s, since the health check interface and semantics are pretty much standard at this point. Among others, nginx and HAProxy can use healthiness data if exposed via HTTP interface.

@MOZGIII MOZGIII added this to the Initial Containers Support milestone Jun 15, 2020
@lukesteensen
Copy link
Member

It doesn't seem like directly exposing the topology healthiness status makes sense as the Kubernetes health check.

Agreed.

just report "healthy" unconditionally and rely on internal protocol-level load balancing

This would be my choice of starting point. It's not obvious how much meaningful health information we'll have to expose, so it makes sense to start with the simplest possible thing.

@MOZGIII
Copy link
Contributor Author

MOZGIII commented Jun 19, 2020

This would be my choice of starting point. It's not obvious how much meaningful health information we'll have to expose, so it makes sense to start with the simplest possible thing.

I think it's a good approach.

Should we even care to do anything then? Not exposing health check API is effectively the same as implementing it as always healthy (well, there are some minor differences).

One benefit of implementing an always-ok health check is that we'll have a placeholder for the future, more advanced implementation - but that doesn't seem like what we'd want to do.

I'm perfectly fine with considering this question resolved for now and closing this issue without any further work.

@lukesteensen
Copy link
Member

Should we even care to do anything then? Not exposing health check API is effectively the same as implementing it as always healthy (well, there are some minor differences).

If there's no benefit to be gained, we shouldn't do any work 😄

@MOZGIII
Copy link
Contributor Author

MOZGIII commented Jun 19, 2020

Ok! We've officially covered readiness checks (for now)!

@MOZGIII MOZGIII closed this as completed Jun 19, 2020
@binarylogic binarylogic removed this from the Initial Containers Support milestone Jul 26, 2020
@MOZGIII MOZGIII added meta: idea Anything in the idea phase. Needs further discussion and consensus before work can begin. platform: kubernetes Anything `kubernetes` platform related labels Sep 21, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
meta: idea Anything in the idea phase. Needs further discussion and consensus before work can begin. platform: kubernetes Anything `kubernetes` platform related
Projects
None yet
Development

No branches or pull requests

3 participants