Skip to content

Asynchronous health checks #13

Closed as not planned
Closed as not planned

Description

@uniqueg

To give clients an idea of the stability of a given services, an (optional) daemon could be implemented in this service that periodically sends heartbeat requests to individual services (e.g., to their /GET service-info endpoints). In order to provide this information to clients effectively, the ExternalService schema could be extended with an object property that provides some or all of the following (and possibly more) information:

  • Status code of last heartbeat
  • Time of last heartbeat
  • Time of last non-success status
  • Time of last success status

The frequency of heartbeats (and timeout!) is probably something that the admin of the cloud registry should set up in the app configuration.

Activity

  1. added
    priority: medium
    status flag: discuss
    status flag: help wanted
    status: blocked
    type: feature
    workload: weeks
    type flag: spec change
    on Nov 13, 2020
  2. added
    workload: days
    and removed
    workload: weeks
    on Mar 1, 2021
  3. uniqueg commented on Mar 1, 2021

    @uniqueg
    MemberAuthor

    Eventually this is probably something that should be discussed with the GA4GH to be implemented globally in the specs. However, for now I think this can be implemented in a relatively simple way:

    • Provide status code and time of last heartbeat, and time of last (un)successful heartbeat request via a dedicated endpoint, e.g., GET services/{service_id}/health
    • Add parameter to set heartbeat frequency and timeout to app configuration in cloud_registry/config.yaml
  4. removed
    status: blocked
    status flag: discuss
    status flag: help wanted
    on Mar 1, 2021
  5. uniqueg commented on Mar 1, 2021

    @uniqueg
    MemberAuthor

    FYI, related discussion at GA4GH, but nothing concrete, so would go ahead as outlined

  6. uniqueg commented on Mar 1, 2021

    @uniqueg
    MemberAuthor

    cwl-WES has an implementation of a daemon that runs tasks asynchronously in the background, although for a very different purpose. Perhaps there is a Python API for running something like cron jobs... In any case, it's important that these background checks are scalable over hundreds or even thousands (but certainly not millions) of services, so heartbeat frequency should probably have a reasonable minimum value of once every 30 minutes or so, with a max timeout of 3 seconds.

  7. uniqueg commented on Mar 1, 2021

    @uniqueg
    MemberAuthor

    Related issue #20, could be implemented in coordination with this issue

  8. uniqueg commented on Oct 20, 2026

    @uniqueg
    MemberAuthor

    Design notes from a review (2026-10-20), for when this is picked up (not scheduled yet):

    • Don't extend the ExternalService schema as proposed above: we keep the GA4GH Service Registry endpoints exactly as specified until the next version of the spec. Instead, separate endpoints: GET /services/{serviceId}/health (details, and uptime statistics from Provide uptime statistics for each service #20) and a list endpoint (e.g., GET /health, latest status of all services), so that clients need one extra call, not one per service.
    • Server-side request forgery: periodically requesting URLs that users registered lets anyone make the registry send requests to addresses of their choice, including internal ones. Safeguards: refuse private, loopback and link-local addresses (after DNS resolution), don't follow redirects, short timeouts, limited response size; possibly check only verified services (Cloud Registry: admin-set "verified" flag (backend and UI) #64).
  9. added
    status: on hold
    on Oct 21, 2026
  10. uniqueg commented on Oct 28, 2026

    @uniqueg
    MemberAuthor

    Closing this for now: it will be addressed once a consistent telemetry architecture has been designed and rolled out across the services in the organization. We will reopen this issue then and update it with the details.

  11. removed
    status: on hold
    on Oct 28, 2026
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

    flag: good 1st issuepriority: mediumtype flag: spec changetype: featureworkload: days

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions