Skip to content

AI Cost Firewall v0.8.8 — Redis Recovery and Operational Resilience

Choose a tag to compare

@vcal-project vcal-project released this 17 Nov 20:43
· 5 commits to main since this release

AI Cost Firewall v0.8.8 — Redis Recovery and Operational Resilience

AI Cost Firewall (AIF) v0.8.8 is a maintenance release focused on recovering automatically from transient Redis outages and write failures, keeping dependency readiness accurate, and improving OpenShift diagnostics.

Redis automatic recovery

  • Adds a periodic write-capable Redis health probe using a short-lived SETEX key. A successful Redis PING or reconnect alone is not considered proof that Redis can accept writes, especially after an AOF persistence error (MISCONF).
  • Retries recovery independently of user traffic. Redis dependency readiness and exact-cache functionality can recover without restarting the AIF process.
  • Preserves a reconnectable Redis exact-cache client when Redis is unavailable at startup and the configured fail-open or Observe policy permits AIF to continue.
  • Preserves the configured Enforce-mode fail-closed startup policy.

Readiness and runtime reload correctness

  • Corrects the dependency-health state used by /readyz after a successful SIGHUP configuration reload, including when Redis fails and subsequently recovers.
  • Adds CLI --readycheck, which checks /readyz and is suitable when an exec-based readiness probe is required.
  • Retains CLI --healthcheck as a liveness check of /healthz for backward compatibility. An OpenShift readiness probe must not substitute liveness for dependency-aware readiness.
  • The supplied OpenShift base Deployment continues to use HTTP /startupz, /readyz, and /healthz for startup, readiness, and liveness, respectively. Its image reference is updated for v0.8.8.

Redis diagnostics and Prometheus metrics

New metrics expose Redis write-health status and recovery transitions:

Metric Description
aif_redis_write_healthy Last periodic write probe: 1 healthy, 0 unhealthy, -1 unknown/not yet checked
aif_redis_write_probes_total{result} Counts successful probes and classified failures (timeout, persistence_rejected, write_rejected, connection_error, redis_error, or client_unavailable)
aif_redis_reconnect_attempts_total{result} Counts connection-manager replacement outcomes (success, error, timeout)
aif_redis_write_transitions_total{state} Counts monitor-observed transitions to available and unavailable