Repository navigation
AI Cost Firewall v0.8.8 — Redis Recovery and Operational Resilience
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
SETEXkey. A successful RedisPINGor 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
/readyzafter a successfulSIGHUPconfiguration reload, including when Redis fails and subsequently recovers. - Adds CLI
--readycheck, which checks/readyzand is suitable when an exec-based readiness probe is required. - Retains CLI
--healthcheckas a liveness check of/healthzfor 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/healthzfor 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 |