[hibernate-dev] Health check status API
Yoann Rodiere
yoann at hibernate.org
Fri Jun 1 03:00:02 EDT 2018
> We could do it via the Statistics mechanism which can be made available
via
JMX.
>From what I understand it would be an explicit call from the user
(OpenShift in this case) that would trigger an active check, like a request
to the database. Not sure the statistics are the best place to put such a
thing.
Or is it about us doing periodic checks on our own, and displaying the
results somewhere for anyone to see if something is wrong? That sounds
unnecessarily complex.
> Probably best to explore this in ORM first, but then Search and OGM
could expose/implement it too for their respective services?
Sure. I wonder about the granularity though: if we have multiple
connections (multiple Elasticsearch cluster, a Lucene cluster with JGroups
or JMS, ...), what would these OpenShift people want us to expose? One big
"everything is fine/something is wrong" status, potentially returning a
specific error message to tell what part is wrong exactly? Or finer-grained
statuses, like "backend X: OK, backend Y: OK, Backend Z/JGroups: OK, ..."?
Also, I suppose we would expose our own APIs/SPIs, right? Not implement
some OpenShift-specific SPIs? I'd rather avoid that...
On Fri, 1 Jun 2018 at 01:36 Vlad Mihalcea <mihalcea.vlad at gmail.com> wrote:
> We could do it via the Statistics mechanism which can be made available via
> JMX.
>
> We just have to add whatever info they are interested in to monitor.
>
> Vlad
>
> On Thu, May 31, 2018 at 7:40 PM, Sanne Grinovero <sanne at hibernate.org>
> wrote:
>
> > It was suggested to me that Hibernate ORM could help people developing
> > microservices on Kubernetes / Openshift by making "health checks"
> > easier.
> >
> > In short, how to expose to some management API that we're being able
> > to connect to the database and do our usual things.
> >
> > This could be done by connection pools as well but I suspect there
> > could be benefits in exposing this information in a unified way at an
> > higher level API; also on top of using ad-hoc specific connection
> > APIs, or Dialect specific instructions, I guess we could monitor
> > timeout exceptions, etc.. happening on the application sessions.
> >
> > Wrote some notes on:
> > - https://hibernate.atlassian.net/browse/HHH-12655
> >
> > Probably best to explore this in ORM first, but then Search and OGM
> > could expose/implement it too for their respective services?
> >
> > Or maybe people would prefer to just run a query?
> >
> > Thanks,
> > Sanne
> > _______________________________________________
> > hibernate-dev mailing list
> > hibernate-dev at lists.jboss.org
> > https://lists.jboss.org/mailman/listinfo/hibernate-dev
> >
> _______________________________________________
> hibernate-dev mailing list
> hibernate-dev at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/hibernate-dev
>
--
Yoann Rodiere
yoann at hibernate.org / yrodiere at redhat.com
Software Engineer
Hibernate NoORM team
More information about the hibernate-dev
mailing list