Skip to content

Proposal: basic health check before declaring a Revision Ready #2674

Closed

Description

@steren

/area API
/kind feature

Problem statement

Today, if I deploy a container image that is not binding to the right port or that crashes at startup, the revision is successfully created and serving traffic (in case I am in runLatest mode). Of course, trying to access it results in a failure: "upstream request timeout".

Proposal

Before marking a new Revision with Ready=True (ready to serve traffic), we implement a basic health check by ensuring that is successfully binds to $PORT.

If, after a given timeout (e.g. 4 minutes), the container is not listening on $PORT, we consider the Revision unhealthy, we mark is as Ready=False and we do not route traffic to it if the service is in runLatest mode.

Activity

  1. added
    area/APIAPI objects and controllers
    kind/featureWell-understood/specified features, ready for coding.
    on Dec 7, 2018
  2. tcnghia commented on Dec 8, 2018

    @tcnghia
    Contributor

    @steren do you have ReadinessProbe for your application? Something like this

        spec:
          container:
            image: your-image
            readinessProbe:
              httpGet:
                path: /
    
  3. steren commented on Dec 8, 2018

    @steren
    ContributorAuthor

    Thanks for pointing this out. But this proposal is more general than for my personal app:

    The idea is to provide some readiness check for users who do not implement a readiness probe.

  4. mattmoor commented on Feb 11, 2019

    @mattmoor
    Contributor

    @tcnghia this is about creating a default tcpProbe of the user container. cc @dgerd (as I think the runtime contract touches on this).

  5. tcnghia commented on Feb 11, 2019

    @tcnghia
    Contributor

    This is fixed now in 0.4.0, since queue-proxy health check also probes the user-container. In addition to that we always configure health check for queue-proxy.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area/APIAPI objects and controllerskind/featureWell-understood/specified features, ready for coding.

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions