Skip to content

Redis production hardening - #1

Merged
an8kk merged 7 commits into
mainfrom
redis-production-hardening-on-main
May 15, 2026
Merged

Redis production hardening#1
an8kk merged 7 commits into
mainfrom
redis-production-hardening-on-main

Conversation

@an8kk

@an8kk an8kk commented May 15, 2026

Copy link
Copy Markdown
Owner

Adds a production-focused hardening pass after v0.1.0-alpha.

Changes:

  • documents Redis persistence, eviction, replication, cluster, and Lua caveats
  • adds cluster-safe Redis key generation with shared hash tags
  • switches Redis Lua transitions to cached script objects
  • adds task attempt tracking
  • adds queue DeadLetter support
  • adds memory and Redis DLQ baseline
  • adds EngineConfig with MaxAttempts and RequeueRetryDelay
  • keeps default infinite retry behavior
  • adds ACK/expiration race coverage
  • adds Redis lists vs Streams ADR
  • updates MOXY.STATS over RESP to include dead count

Verification:

  • go mod tidy
  • go vet ./...
  • go test ./...
  • go test ./internal/queue -count=100
  • go test ./internal/core -count=100
  • go test ./internal/service -count=100
  • go test ./internal/command -count=100
  • go test ./internal/protocol -count=100
  • go test ./internal/server -count=100
  • go test ./internal/resp -count=100

Manual smoke:

  • PING -> PONG
  • MOXY.ENQUEUE jobs hello -> task_id
  • MOXY.FETCH jobs 30000 -> lease_id/task_id/payload
  • MOXY.STATS jobs -> ready 0 processing 1 dead 0 active_leases 1 heap 1

Limitations:

  • Redis integration tests were not run successfully in this environment because Redis was unavailable on localhost:6379.
  • No Streams backend.
  • No WAL.
  • No snapshots.
  • No full Redis proxying.
  • No production-readiness claim.

an8kk added 7 commits May 15, 2026 19:47
Document Redis durability, eviction, failover, cluster slot, Lua, DLQ, and Streams caveats for the alpha Redis backend.
Centralize Redis queue key construction around a shared hash tag and ensure Redis integration cleanup deletes ready, processing, and dead-letter keys.
Keep Redis transition scripts as reusable queue-owned script objects and add coverage for repeated script execution paths.
Track task attempts, add backend dead-letter transitions, include dead counts in stats, and let engine max-attempt config move expired tasks out of the retry loop.
Add explicit regression coverage for ACK-before-reap, reap-before-ACK, DLQ-on-expiration, and stale lease state expectations.
Record why the alpha Redis backend keeps lists plus LMOVE and Lua while acknowledging Streams as a valid future backend.
Clean up the Redis dead-letter key in core integration tests and keep README non-goals aligned with the TCP/RESP command path on main.
@an8kk
an8kk merged commit fd78bc3 into main May 15, 2026
2 checks passed
@an8kk
an8kk deleted the redis-production-hardening-on-main branch May 15, 2026 15:01
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.

1 participant