markhoerth commented on code in PR #12402:
URL: https://github.com/apache/gravitino/pull/12402#discussion_r3753605899


##########
docs/health-and-readiness.md:
##########
@@ -0,0 +1,134 @@
+---
+title: "Health and readiness"
+slug: /health-and-readiness
+keywords:
+  - health
+  - readiness
+  - liveness
+  - monitoring
+license: "This software is licensed under the Apache License version 2."
+---
+
+Gravitino exposes separate liveness and readiness endpoints so that a caller 
can tell "restart this
+process" apart from "send traffic somewhere else." Liveness answers whether 
the server can respond
+at all. Readiness answers whether it can reach the entity store and therefore 
do useful work.
+
+The endpoints follow MicroProfile Health semantics. A healthy check returns 
200 and an unhealthy one
+returns 503, both with a JSON body naming the individual checks that ran.
+
+## Quick Start
+
+**1. Check liveness.** This returns 200 whenever an HTTP thread is able to 
answer.
+
+```shell
+GRAVITINO_URL=http://localhost:8090

Review Comment:
   Yes, added. Both services register their own health resources on their own 
Jetty server,
   including in auxiliary mode, so the Gravitino server's endpoints say nothing 
about them.
   The new section carries the paths, ports, and readiness check names for all 
three.
   
   It also states what each readiness check actually tests, since the two 
services check less
   than the Gravitino server does and in different ways. Iceberg reports UP once
   IcebergCatalogWrapperManager is bound, which happens at startup, so it never 
reflects the
   catalog behind it. Lance reports UP once NamespaceWrapper is initialized, 
and that
   initialization is deferred until the first namespace or table request.
   
   That second one has a consequence worth stating on the page: 
/lance/health/ready cannot be
   used as a Kubernetes readiness probe on its own, because a failing readiness 
probe keeps the
   pod out of the Service, no request arrives, and the wrapper never 
initializes. The page says
   to keep Lance liveness on the health endpoint and leave readiness on a 
request path.
   
   The chart defaults are a separate change. The Gravitino chart probes / , 
while the Iceberg
   and Lance charts probe request paths that carry no credentials once 
authentication is on.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to