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

health link relation #5

Open
pmhsfelix opened this issue Jan 16, 2018 · 10 comments
Open

health link relation #5

pmhsfelix opened this issue Jan 16, 2018 · 10 comments

Comments

@pmhsfelix
Copy link

It would be interesting to also propose a health link relation (or similar). I imagine a scenario where service responses include a Link header with it

Link: <https://example.com/monitoring/health>; rel="health"

This link relation could also be used on application/json-home representations

{
  "api": {
      
  },

  "resources": {
    "health": {
      "href": "/monitoring/health"
    }      
  }
  
}

This would be a nice way to improve discoverability.

@dret
Copy link
Contributor

dret commented Jan 17, 2018 via email

@inadarei
Copy link
Owner

Yeap, I think Erik's "status" link rel would be the one. We should reference it somehow from this spec.

@dret
Copy link
Contributor

dret commented Jan 18, 2018 via email

@inadarei
Copy link
Owner

@todo: reference status link rel from the spec.

@mogsie
Copy link

mogsie commented Dec 5, 2018

Have you considered using well-known URIs (with associated registry) and include a registration for a well known URI /.well-known/health ?

@inadarei
Copy link
Owner

inadarei commented Dec 6, 2018

Since the RFC defines content format and not the address (e.g. in Kubernetes the format would be used by two endpoints for liveness checks and readiness checks), these kind of things may only be defined in an FAQ section of the RFC as the additional suggestions.

That said, speaking of well-known URIs specifically, the spec has been standard for over 8 years but I personally haven't seen it in common usage. Is it just me? What are some prominent usages of well-known URIs that you know?

@mogsie
Copy link

mogsie commented Dec 6, 2018

Off the top of my head ACME Challenges stands out as the one big success story. The well-known registry itself has numerous entries, so presumably it's being used, but like with ACME challenges, in places where we don't notice.

Registering a .well-known name is just a nice way of "getting out of the way" of the primary namespace of the host, and might ease discoverability by way of a management server simply ask GET /.well-known/health without having to discover the resource URI; an origin is enough. Either it gets an application/health+json document, or it doesn't.

@dret
Copy link
Contributor

dret commented Dec 6, 2018 via email

@mogsie
Copy link

mogsie commented Dec 6, 2018

I am not arguing against using links to discover the health of a system, because I do recognise that an API might want to link to a health resource to allow clients of that API to react accordingly. (For example, api.example.com might have a link to health.example.com/api to report on the API's health.)

However, I also see situations where you have a large set of heterogeneous components (e.g. APIs, web pages, caches) that might have little in common when it comes to media types (home documents), but that might all (because of an internal service policy) expose some notion of health using application/health+json. Having to go through some home document to look for the health resource seems wasteful, since these various services might have different "home documents", some might not even have room for a home document that supports a link with this relation.

If this spec registered health in the well-known registry, it could make it a lot easier to deploy health checks to a lot of components where linking does not make sense.

@dret
Copy link
Contributor

dret commented Dec 6, 2018 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants