<div dir="ltr">Just for clarification - if we used the management HTTP server - would it be possible to expose health endpoints in Library mode? I think the library use case might be also very important.</div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Jul 26, 2016 at 10:34 AM, Tristan Tarrant <span dir="ltr"><<a href="mailto:ttarrant@redhat.com" target="_blank">ttarrant@redhat.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">On 26/07/16 10:24, Sebastian Laskawiec wrote:<br>
> Hey Tristan!<br>
><br>
> Comments inlined.<br>
><br>
> Thanks<br>
> Sebastian<br>
><br>
> On Tue, Jul 26, 2016 at 9:50 AM, Tristan Tarrant <<a href="mailto:ttarrant@redhat.com">ttarrant@redhat.com</a><br>
</span><span class="">> <mailto:<a href="mailto:ttarrant@redhat.com">ttarrant@redhat.com</a>>> wrote:<br>
><br>
> On 26/07/16 07:10, Sebastian Laskawiec wrote:<br>
> > Dear Community,<br>
> ><br>
> > I'd like to ask you for help. I'm currently sketching a design for a<br>
> > REST health check endpoint for Infinispan and I'm trying to imagine<br>
> > possible use cases.<br>
> The health-check should be implemented as an MBean initially, with the<br>
> ability to expose it via alternative implementations later. The server<br>
> RESTful endpoint should be registered with the management<br>
> interface via<br>
> a special handler.<br>
><br>
><br>
> Yes, I think it's a good idea. We could even use tools like Jolokia<br>
> [1] to expose MBeans through REST interface (it can be added to<br>
> standalone.conf to the bootstrap classpath). Alternatively we could<br>
> use JDK embedded HTTP Server [2].<br>
<br>
</span>No, for server we would not use Jolokia but rely on the management HTTP<br>
server (the one that handles port 9990 already).<br>
<div><div class="h5"><br>
><br>
> A cache and cachemanager's health is determined by a combination of<br>
> parameters and we probably should allow for a user-pluggable<br>
> checker. We<br>
> already expose a number of statuses already, although obviously this<br>
> would be an aggregate.<br>
><br>
><br>
> Could you please elaborate more on that? How do we expose this<br>
> information? Are you referring to Infinispan Stats [3]?<br>
><br>
> I also though about supporting queries somehow. An imaginary example<br>
> from the top of my head could look like the following:<br>
><br>
> http://$ISPN/_health?cluster.nodes=3&MyCacheManager.MyCache.status=DEGRADED<br>
> //<-- This would return 200 OK if we have 3 nodes and given cache is<br>
> in degraded mode.<br>
> http://$ISPN/_health?cluster.nodes=3&MyCacheManager.rebalance=IN_PROGRESS<br>
> //<-- Checks if we have 3 nodes and rebalance is in proress<br>
><br>
> [3]<br>
> <a href="https://github.com/infinispan/infinispan/tree/8.2.x/core/src/main/java/org/infinispan/stats" rel="noreferrer" target="_blank">https://github.com/infinispan/infinispan/tree/8.2.x/core/src/main/java/org/infinispan/stats</a><br>
><br>
><br>
> ><br>
> > Could you please give me a hand and tell me what functionalities are<br>
> > important for you? Would you like to be able to check status<br>
> per-cache<br>
> > or maybe a red (not healthy), green (healthy), yellow (healthy,<br>
> > rebalance in progress) cluster status is sufficient? What kind of<br>
> > information do you expect to be there?<br>
> I wouldn't want this to be overly complex: a simple OK, KO should be<br>
> sufficient. Additional detail may be optionally present, but not a<br>
> requirement.<br>
><br>
><br>
> I think we will need at least a 3rd state - yellow or something like<br>
> this. This would mean that a rebalance is in progress of a node is<br>
> joining/leaving. In other words - the cluster accepts requests but<br>
> don't touch the nodes!<br>
</div></div>Agreed.<br>
<span class="HOEnZb"><font color="#888888"><br>
Tristan<br>
</font></span><div class="HOEnZb"><div class="h5">_______________________________________________<br>
infinispan-dev mailing list<br>
<a href="mailto:infinispan-dev@lists.jboss.org">infinispan-dev@lists.jboss.org</a><br>
<a href="https://lists.jboss.org/mailman/listinfo/infinispan-dev" rel="noreferrer" target="_blank">https://lists.jboss.org/mailman/listinfo/infinispan-dev</a><br>
</div></div></blockquote></div><br></div>