buildbuddy-io / buildbuddy

BuildBuddy is an open source Bazel build event viewer, result store, remote cache, and remote build execution platform.

Home Page:https://buildbuddy.io

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

/ping endpoint

evis opened this issue · comments

Is your feature request related to a problem? Please describe.

I want to deploy buildbuddy instances under a load balancer. When load balancer gets via non-200 ok response from /ping, then it should stop loading this instance with requests.

Describe the solution you'd like

New /ping endpoint.

Describe alternatives you've considered

I've searched for such endpoint in buildbuddy, but haven't found any.

For now, we've made /ping endpoint that always returns 200, but it doesn't check if buildbuddy is really healthy.

Additional context

Hey @evis, how are you deploying BuildBuddy today?

If you are using our helm chart, these liveness and readiness probes should be set automatically

https://github.com/buildbuddy-io/buildbuddy-helm/blob/cde7a7f8dcb12047c7ddb016400199aeee98c7ed/charts/buildbuddy/templates/deployment.yaml#L73-L89

          livenessProbe:
            initialDelaySeconds: 10
            timeoutSeconds: 5
            failureThreshold: 3
            httpGet:
              path: /healthz
              port: http
              httpHeaders:
                - name: server-type
                  value: buildbuddy-server
          readinessProbe:
            httpGet:
              path: /readyz
              port: http
              httpHeaders:
                - name: server-type
                  value: buildbuddy-server

Would these work for your use case?

Just a reminder: the FOSS version of BuildBuddy does not handle HA very well. Our enterprise version might serve your use case much better. If you are interested in the enterprise version, please contact us via https://www.buildbuddy.io/request-quote/ 🙇

Hi @evis,

BuildBuddy supports health checking either via the /healthz HTTP endpoint or via gRPC endpoint:

HTTP Example:

$ curl http://localhost:8080/healthz?server-type=buildbuddy-server
OK
$

gRPC Example:

$ grpcurl -plaintext localhost:1985 grpc.health.v1.Health.Check
{
  "status": "SERVING"
}
$

Cheers!