Request icon
Return icon
Switch icon
Log icon
SlackIncomingWebhook icon
OutputValues icon
Schedule icon

Infinispan Distributed Cache Cluster Health and Rebalancing Sentinel

Monitor Infinispan in-memory data grid health, partition rebalancing, node membership, and cache metrics with automated Slack incident response.

Categories
DataInfrastructure

Continuously audits Infinispan in-memory data grid and distributed cache clusters by querying management REST endpoints, evaluating cluster partition health and topology rebalancing states, verifying minimum node quorum thresholds, and alerting incident response teams via Slack.

How it works

  1. probe_cluster_health (io.kestra.plugin.core.http.Request) submits an authenticated HTTP GET request to the Infinispan cache manager health endpoint (/rest/v2/cache-managers/{manager}/health), pulling real-time metadata including cluster_name, health_status, number_of_nodes, and individual cache degradation states.
  2. probe_cache_stats (io.kestra.plugin.core.http.Request) queries the target cache metrics endpoint (/rest/v2/caches/{cache}/stats) to monitor live entry counts, off-heap memory consumption, and cache eviction pressures.
  3. classify_cluster_posture (io.kestra.plugin.core.debug.Return) evaluates response status codes and cluster telemetry using a declarative Pebble expression:
    • Classifies as CLUSTER_UNREACHABLE if endpoints cannot be reached over the network or return non-200 responses.
    • Classifies as CLUSTER_DEGRADED if the cluster health state indicates partition loss or node failure (DEGRADED).
    • Classifies as REBALANCING_IN_PROGRESS if partition rebalancing is actively migrating data across nodes (HEALTHY_REBALANCING).
    • Classifies as NODE_MEMBERSHIP_DEFICIT if active cluster nodes fall below the configured min_expected_nodes threshold.
    • Classifies as HEALTHY_OPTIMAL when all health checks and quorum thresholds succeed.
  4. route_by_posture (io.kestra.plugin.core.flow.Switch) branches execution based on the evaluated classification:
    • HEALTHY_OPTIMAL: Dispatches an informational audit log with cluster topology, member names, and cache entry metrics.
    • CLUSTER_DEGRADED: Dispatches a critical Slack alert highlighting degraded cache names and requesting immediate failover intervention.
    • REBALANCING_IN_PROGRESS: Sends a warning Slack notification alerting engineering teams of active topology rebalancing.
    • NODE_MEMBERSHIP_DEFICIT: Sends a Slack warning flagging missing cluster nodes before quorum is permanently lost.
    • CLUSTER_UNREACHABLE: Posts an urgent incident alert indicating network partitions or container runtime crashes.
  5. audit_summary (io.kestra.plugin.core.output.OutputValues) exports structured metrics for downstream monitoring and compliance auditing.
  6. errors captures unexpected workflow execution failures and alerts on-call teams via Slack.

What you get

  • Automated, continuous validation of Infinispan distributed data grid cluster health and partition states.
  • Early detection of node drops and split-brain scenarios before application sessions or distributed locks degrade.
  • Active visibility into partition rebalancing operations following planned maintenance or autoscaling events.
  • Real-time Slack notifications with actionable cluster diagnostic context and degraded cache names.
  • Centralized execution history meeting enterprise SLA and observability requirements.

Who it's for

  • Platform Engineers and SREs maintaining high-availability in-memory caching and session backbones.
  • Kubernetes and Cloud Infrastructure Teams operating stateful Infinispan clusters.
  • Enterprise Architects overseeing identity providers (e.g., Keycloak) and distributed transactional systems reliant on Infinispan data grids.

Why orchestrate this with Kestra

Infinispan data grid failures are severe incidents that immediately cascade into dependent microservices, API gateways, and session stores. Standard port liveness checks are blind to internal cluster health transitions such as HEALTHY_REBALANCING or cache-level DEGRADED states. Kestra provides declarative, resilient multi-stage orchestration that probes cluster management APIs, validates quorum policies, isolates transient connection blips, dispatches formatted Slack alerts, and maintains auditable execution logs without managing brittle custom scripts.

Prerequisites

  • A running Infinispan server instance or cluster (version 14.x, 15.x, or later) accessible over HTTP/HTTPS.
  • An administrative user configured in the Infinispan security realm with permissions to access REST endpoints.
  • An incoming Slack webhook URL for operational incident dispatch.

Secrets

  • INFINISPAN_PASSWORD: Password for the administrative user used to authenticate HTTP requests against the Infinispan REST API.
  • SLACK_WEBHOOK_URL: Incoming Slack webhook URL used by alert_cluster_degraded_slack, alert_rebalancing_slack, alert_membership_deficit_slack, alert_unreachable_slack, and alert_workflow_failure.

Quick start

  1. Configure INFINISPAN_PASSWORD and SLACK_WEBHOOK_URL in your Kestra namespace secrets.
  2. Start a local Infinispan server using Docker:
    docker run -d --name infinispan -p 11222:11222 -e USER="admin" -e PASS="adminPassword123!" infinispan/server:latest
    
  3. Import this blueprint into Kestra and trigger an execution with default inputs (infinispan_host: "localhost").
  4. Verify that classify_cluster_posture outputs HEALTHY_OPTIMAL and review the recorded metrics in audit_summary.
  5. Activate the scheduled_cluster_audit trigger to establish recurring health audits every 15 minutes.

How to extend

  • Add automated scaling triggers using Kestra's Docker or Kubernetes plugins to spin up replacement nodes when NODE_MEMBERSHIP_DEFICIT is detected.
  • Incorporate memory threshold gates by evaluating approximate_in_memory_bytes against configured quotas to warn before out-of-memory evictions occur.
  • Forward audit metrics directly to Prometheus or Datadog using Kestra metric tasks for long-term telemetry trend analysis.

Links

See How

New to Kestra?

Use blueprints to kickstart your first workflows.