Skip to content

feat: replace liveness probe with httpGet when instance manager enabled - #13

Merged
usiegj00 merged 1 commit into
mainfrom
feature/httpget-liveness-probe
Jan 25, 2026
Merged

feat: replace liveness probe with httpGet when instance manager enabled#13
usiegj00 merged 1 commit into
mainfrom
feature/httpget-liveness-probe

Conversation

@usiegj00

Copy link
Copy Markdown
Collaborator

Summary

Replaces the process-spawning liveness probe with an HTTP probe to /healthz:8080 when instance manager is enabled.

Fixes #7

Changes

Condition Liveness Probe
instanceManagerImage set httpGet /healthz:8080
instanceManagerImage not set exec redis-cli ping (legacy)

Before (exec probe)

livenessProbe:
  exec:
    command: ["sh", "-c", "redis-cli ... ping | grep PONG"]

Problems:

  • Spawns new process every 15 seconds
  • redis-cli startup adds ~50ms latency
  • Fails under memory pressure

After (httpGet probe)

livenessProbe:
  httpGet:
    path: /healthz
    port: 8080

Benefits:

  • No process spawning
  • ~1-5ms latency
  • Works under memory pressure

Backwards Compatibility

  • Only applies when instanceManagerImage is set
  • Legacy exec probe used when instance manager not enabled
  • No breaking changes for existing deployments

Test Coverage

  • Unit tests for HTTP probe when instance manager enabled
  • Unit tests for exec probe when instance manager disabled
  • E2E tests verify httpGet probe configuration
  • E2E tests verify health port is exposed

Test Plan

  • Unit tests pass
  • E2E tests pass
  • httpGet probe configured when instance manager enabled
  • exec probe used when instance manager disabled
  • Health port 8080 exposed in container spec

When instanceManagerImage is set, use HTTP liveness probe to /healthz:8080
instead of spawning redis-cli processes. This follows the CNPG model and
provides better performance under memory pressure.

Changes:
- Use httpGet probe to /healthz:8080 when instance manager enabled
- Fall back to exec probe (redis-cli) when instance manager not enabled
- Expose health port 8080 in container spec when instance manager enabled

Benefits:
- No process spawning (~50ms savings per probe)
- Works better under memory pressure
- Simpler probe configuration

Backwards compatible: only applies when instanceManagerImage is set.

Fixes #7
@usiegj00
usiegj00 merged commit 4626b8a into main Jan 25, 2026
12 checks passed
@usiegj00
usiegj00 deleted the feature/httpget-liveness-probe branch January 25, 2026 05:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Replace liveness probe with instance manager /healthz

1 participant