Skip to content

feat: replace readiness probe with httpGet when instance manager enabled - #14

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

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

Conversation

@usiegj00

@usiegj00 usiegj00 commented Jan 25, 2026

Copy link
Copy Markdown
Collaborator

Summary

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

Fixes #8

Changes

Condition Readiness Probe
instanceManagerImage set httpGet /readyz:8080
instanceManagerImage not set exec ready.sh (legacy)

Operation Comparison: ready.sh vs /readyz

Condition ready.sh /readyz
Master role ✅ Always ready ✅ Always ready (unless loading)
loading:1 ❌ Not checked ✅ NOT ready
master_sync_in_progress:1 ✅ NOT ready ✅ NOT ready
master_host:127.0.0.1 ✅ NOT ready ✅ NOT ready
master_link_status:down ❌ Not checked ✅ NOT ready

The /readyz endpoint covers all ready.sh checks plus additional safety checks.

Before (exec probe)

readinessProbe:
  exec:
    command: ["/bin/sh", "/redis-readiness/ready.sh"]

Problems:

  • Spawns new process every 10 seconds
  • Script startup adds latency
  • Fails under memory pressure

After (httpGet probe)

readinessProbe:
  httpGet:
    path: /readyz
    port: 8080

Benefits:

  • No process spawning
  • ~1-5ms latency
  • Works under memory pressure
  • Persistent Redis connection with cached status

Backwards Compatibility

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

Test Plan

  • Unit tests for HTTP probe when instance manager enabled
  • Unit tests for exec probe when instance manager disabled
  • Unit test for no-master-configured check
  • E2E tests verify httpGet readiness probe configuration

@usiegj00
usiegj00 force-pushed the feature/httpget-readiness-probe branch from b4ff3fe to 951c5fb Compare January 25, 2026 05:20
Use HTTP GET probe to /readyz:8080 for readiness when instance manager
is enabled, falling back to legacy exec probe otherwise.

- Add instanceManagerReadyzPath constant
- Update readiness probe generation to use httpGet when enabled
- Add unit tests for HTTP and exec readiness probes
- Add E2E tests to verify httpGet readiness probe configuration
- Add no-master-configured check to /readyz for ready.sh parity

Fixes #8
@usiegj00
usiegj00 force-pushed the feature/httpget-readiness-probe branch from 951c5fb to 18877f0 Compare January 25, 2026 05:20
@usiegj00
usiegj00 merged commit 0e0fe63 into main Jan 25, 2026
12 checks passed
@usiegj00
usiegj00 deleted the feature/httpget-readiness-probe branch January 25, 2026 05:35
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 readiness probe with instance manager /readyz

1 participant