Giter Club home page Giter Club logo

Comments (3)

bendiktv2 avatar bendiktv2 commented on June 10, 2024 1

One example use-case is to let a Kubernetes livenessProbe run against one service default or liveness that can be set to true immediately, while letting a Kubernetes readynessProbe run against the exposed gRPC/Connect service-name (e.g. acme.user.v1.UserService).

This way, we can start the Connect-server immediately on startup, with the defaultservice being set to healthy (so that Kubernetes does not kill the app while starting up), and then run some long-running initialization-procedures (like reading a big file into memory, or doing some initial DB-querying for in-memory-caching), before setting the acme.user.v1.UserService-service to healthy.

This will allow Kubernetes to start our pod, but not serve any traffic to it until we are done initializing the service.

from grpchealth-go.

akshayjshah avatar akshayjshah commented on June 10, 2024

Sorry for the late response; I somehow completely missed this issue 😬 Very little about the grpc/health package appeals to me - particularly the init-time side effect - but I'm certainly open to adding some functionality here.

My concern with adding a simple bag of state as a dynamic Checker implementation is that it doesn't seem to simplify the problem much. If you're interested in dynamic health, you're probably actively checking the health of some downstream system (for example, pinging your database). In that case, you probably want to run your probes on a schedule and cache the result - querying downstream systems for each health check gets expensive quickly. Wouldn't it be better to encapsulate this whole process?

from grpchealth-go.

akshayjshah avatar akshayjshah commented on June 10, 2024

@bendiktv2 Sorry for the long delay! Opened a PR that addresses this issue as part of getting us to a stable release.

from grpchealth-go.

Related Issues (3)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.