Skip to content

fix(infra)(#321): aggregator-proxy /health passes through to backend#323

Open
vrogojin wants to merge 1 commit into
mainfrom
fix/aggregator-proxy-health-passthrough
Open

fix(infra)(#321): aggregator-proxy /health passes through to backend#323
vrogojin wants to merge 1 commit into
mainfrom
fix/aggregator-proxy-health-passthrough

Conversation

@vrogojin
Copy link
Copy Markdown
Contributor

Summary

The proxy was returning a hardcoded {"status":"ok"} for /health, hiding the backend's rich health response (role, sharding, commitment_queue, database). Tools like unicity-infra-probe marked the aggregator DEGRADED because they couldn't distinguish a healthy backend from a wedged one.

Pass /health through to the backend. Proxy liveness becomes implicit.

Verified live

$ curl -s https://aggregator-unicity-dev.dyndns.org/health | jq -c
{"status":"ok","role":"standalone","serverId":"0b96d7aa0059-1",
 "sharding":{"mode":"standalone","shardIdLen":4,"shardId":0},
 "details":{"commitment_queue":"0","commitment_queue_status":"healthy",
              "database":"connected"}}

Follow-ups

  • unicity-infra-probe still reports DEGRADED because it expects {status:"healthy", database:"ok"} rather than the actual aggregator schema {status:"ok", details.database:"connected"}. That's probe-side schema drift, separate fix in unicitynetwork/infra-probe.

Test plan

  • curl https://aggregator-unicity-dev.dyndns.org/health returns the rich payload (verified)
  • proxy container is healthy (verified)
  • JSON-RPC POST still works (proxy unchanged for other locations)

The proxy was returning a hardcoded {"status":"ok"} for /health,
which hid the backend's rich health response (role, sharding,
commitment_queue, database). unicity-infra-probe and similar
monitoring tools mark the aggregator DEGRADED because they can't
distinguish a healthy backend from a wedged one — both produce
the same canned reply.

Pass /health through to the backend like every other path. Proxy
liveness becomes implicit: if nginx forwards and reads the reply,
both halves are alive.

Live response now (verified):
  {"status":"ok","role":"standalone","details":{
    "commitment_queue":"0","database":"connected", ...}}

(Note: unicity-infra-probe still reports DEGRADED because it
expects `{status:"healthy", database:"ok"}` rather than the
aggregator binary's actual `{status:"ok", details.database:
"connected"}` schema — that's a probe-side schema drift, not
fixed by this change.)
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