Class JavalinClusterSupport
java.lang.Object
com.kingsrook.qqq.middleware.javalin.cluster.JavalinClusterSupport
Javalin side of running as one node of a cluster (spec
2026-10-15-cluster-ha-design, sections A and D):
- a node without the web role answers 503 on every route except probes and
metrics, so a Service that routes users to it is obvious at once;
- Jetty stops gracefully: in-flight requests finish (up to
QQQ_HTTP_DRAIN_SECONDS, default 20) before connections close;
- on SIGTERM the node drains: it reports not-ready (QNodeLifecycle), waits
QQQ_DRAIN_DELAY_SECONDS (default 0 - a k8s preStop sleep usually covers
endpoint propagation), lets this node's async process steps finish (up to
QQQ_ASYNC_DRAIN_SECONDS, default 20), then stops the server.
-
Method Summary
Modifier and TypeMethodDescriptionstatic voidconfigure(io.javalin.config.JavalinConfig config) Apply to a Javalin config: graceful Jetty stop and the web-role filter.static ThreadinstallShutdownHook(Runnable stopServer) The SIGTERM drain, run before the given stop action.
-
Method Details
-
configure
public static void configure(io.javalin.config.JavalinConfig config) Apply to a Javalin config: graceful Jetty stop and the web-role filter. -
installShutdownHook
-