animo / animo-mediator

An easy to set-up Aries and DIDComm v1 mediator built on Aries Framework JavaScript.
8 stars 9 forks source link

Add a /health endpoint #13

Open icc-garciaju opened 1 year ago

icc-garciaju commented 1 year ago

It could be nice to have a /health enpoint in order to be able to monitor the status of the mediator.

Thanks in avance and thanks for your great work.

TimoGlastra commented 1 year ago

Agreed, that would be a good addition. should it be exposed on a separate port? You probably don't want this to be exposed to the public, where the endpoint for DIDcomm should be exposed.

This can of course be managed by routing based on path.

Are you willing to open a PR for these changes?

icc-garciaju commented 1 year ago

Having it on another port will suffice in most cases.

If you deploy it on a kubernetes cluster, and want to monitor it externally, you can use a path on the ingress to redirect it to another port. For kubernetes healthcheck, it won't make any difference. If you deploy it using docker, you can use a reverse proxy to protect it based on source IP.

But having it on the same port, would be easier to implement as no other listener has to be added.

Anyway, thank you in advance.