How the Hyperswitch deep health check keeps bad pods out of payment traffic
A deep health check stops a pod that cannot reach its dependencies from receiving payment traffic. The failure this prevents is a Hyperswitch router pod that reports healthy because its process is running, while it cannot reach PostgreSQL, Redis, the card vault or an outbound processor endpoint. A simple liveness ping only confirms the process responds. It does not confirm the pod can complete a payment. Teams need a deep check once they run more than one router pod behind a load balancer or Kubernetes service, because a single dependency fault can otherwise leave some pods accepting requests and failing them. The gap matters most where a dependency is shared across pods and a partial outage would look like random declined payments rather than a clear outage.
The practical design question is which checks gate readiness and which only inform operators. Readiness decides whether the pod stays in the service endpoints, so checks that depend on a slow external processor can remove healthy pods during a processor incident and shrink capacity at the moment of greatest demand. Liveness decides whether Kubernetes restarts the container, and a deep check wired there can cause restart loops during a database failover. Plan the two probes separately, and decide with your payments and platform owners which dependency failures should take a pod out of rotation. Confirm the exact endpoint paths, response bodies and check names in the Hyperswitch release you deploy, using the self-hosting documentation, because the researched facts for this topic do not list them. Do not write probe configuration from examples in other guides until you have tested it against your own version.
Which health signals to wire into which probe
This table compares the three Kubernetes probe types against the dependency checks a deep health endpoint can cover, so you can see which signal belongs in which probe. Read each row as a decision: what the probe is for, and what goes wrong if a shared dependency failure reaches it. The main takeaway is that a deep check should rarely gate restarts, and that readiness is where dependency checks belong, with thresholds chosen carefully.
| Probe or signal | When it fits | Main risk |
|---|---|---|
| Liveness probe | Detecting a router process that is hung or deadlocked and needs a restart. Keep it shallow so it only reflects the process itself. | A deep check here can restart every pod during a Redis or PostgreSQL outage, making recovery slower. |
| Readiness probe | Removing a pod from Service endpoints when it cannot serve payment traffic. This is the usual home for database and Redis checks. | A shared dependency outage can mark every pod unready at once, leaving no endpoints and failing all traffic. |
| Startup probe | Giving slow first boots, migrations or cache warm-up time before liveness checks begin. | Too short a window causes restart loops. Confirm boot time in your environment before setting it. |
| Deep health: database | Confirms the router can reach PostgreSQL, the primary path for writes and reads. | Replica lag or connection pool exhaustion may show as intermittent failures rather than a clean outage. |
| Deep health: Redis | Confirms cache, idempotency and scheduler queue access are reachable. | Redis failures degrade more than availability, so a passing check does not prove the hot path is healthy. |
| Deep health: vault | Confirms the card vault or encryption service responds when your model depends on it. | A vault dependency check can block all payments, including those that never touch the vault. |
| Deep health: outbound connectivity | Confirms egress to processors, often through a proxy, before traffic is routed there. | Processor endpoints fail independently. Gating readiness on one processor can remove healthy pods from service. |
What the router, scheduler and dependencies each contribute to readiness
A readiness decision that only confirms the process is running tells you almost nothing about whether Hyperswitch can take a payment. The Router and the Scheduler are both app services that depend on PostgreSQL with a master and replica setup and on Redis for caching and the scheduler queue, according to the Hyperswitch architecture documentation. A Router pod with a healthy process but an unreachable primary database cannot authorize, store or look up anything, so it should not receive traffic. The same logic applies to Redis, which the hot path uses for caching and which the Scheduler uses as its queue. Before you wire any probe, confirm with your own deployment which of these checks the deep health endpoint actually performs, and which it only reports on.
The card vault is a separate Rust service, and the encryption service for key management is a further dependency. A Router that can reach the database and Redis but not the vault can still accept requests that involve stored cards, and those requests will fail in a way that looks like a payment problem rather than an infrastructure one. Decide explicitly whether a vault outage should remove a Router pod from rotation or only degrade a subset of flows, and make sure your readiness logic and your alerting make the same decision. The Scheduler is a different case: it runs tasks such as card data deletion and API key expiry notices, so its readiness affects background obligations more than the live payment path.
Outbound connectivity to processors needs its own attention because it fails differently from the internal dependencies. A processor endpoint that is unreachable from your egress path will not show up in a database or Redis check, and marking every Router pod unready for one processor's outage would remove capacity for all the others. Treat processor reachability as a signal for routing and alerting, and confirm with your team how the deep health endpoint reports individual connector failures before you let it gate traffic. Verify the egress path from inside the cluster, including any proxy and allow-list rules, in the same environment where the probes will run.
How probe results flow from dependencies to traffic routing
The diagram starts at the kubelet, which calls the readiness and liveness probes on a Router pod. The Router checks PostgreSQL (primary and replica), Redis, the card vault and outbound connectivity to processor endpoints. Processor endpoints sit outside the cluster boundary, so that check crosses the trust boundary and depends on egress rules. When readiness fails, the Kubernetes Service stops sending traffic to that pod. Scheduler pods run on a separate probe path but use the same Redis and PostgreSQL, so check them as their own path. Confirm that each dependency failure produces the response you expect before go-live.
Readiness failures remove a Router pod from Service endpoints.
Wiring the deep health check into readiness probes in six steps
This sequence takes a self-hosted Hyperswitch cluster from an unverified health endpoint to readiness probes that pull a pod out of rotation when a required dependency fails, and return it when the dependency recovers.
Confirm the release and chart compatibility
The platform engineer records the Hyperswitch router version, the Helm chart version and the Control Center version in use, then checks the release notes and compatibility matrix for each release on the Hyperswitch GitHub releases page. Confirm that any required configuration dependency for the target version is already running in the non-production cluster, because the v1.124.0 release notes made Superposition a required dependency before upgrading to that version. The step is done when you can name one router version and one chart version that you have confirmed as compatible with each other, and the open items are written down.
Enable and locate the deep health endpoint
In the non-production cluster, the platform engineer enables the deep health setting in the Helm values for the router, using the key names given in the chart for that release, and applies the change through the normal deployment path. Confirm the exact endpoint path and the port from the chart templates and the router configuration for your version, not from memory. The step is done when the router pods restart cleanly and the endpoint answers on a pod-level request from inside the cluster.
Call the endpoint manually and record each dependency
The platform engineer calls the deep health endpoint directly against a router pod, then repeats the call against the service, and records the status code, response body and time for each dependency the response reports, including PostgreSQL, Redis, the card vault and outbound connectivity where the response includes them. Note which checks are reported as required and which are informational for your configuration. The step is done when you have a baseline table that shows every dependency reporting healthy, and you can explain what each field in the body means.
Point readiness at the deep check
The platform engineer sets the readiness probe in the router deployment to call the deep health endpoint, and keeps the liveness probe on a lightweight process check that does not call PostgreSQL, Redis or the vault. The reason for the split is that a readiness failure removes the pod from service traffic, while a liveness failure restarts it, so a dependency outage should not cause restart loops. Review the rendered manifest with
kubectl get deployment -o yamlto confirm both probe paths. The step is done when the manifest shows the two probes pointing at different endpoints.Tune period, timeout and failure threshold
The platform engineer measures the response time of the deep health endpoint under normal load during the load test runs, and sets the probe timeout above that measured figure with margin, then chooses the period and failure threshold so a brief blip does not drop a pod while a sustained outage does. Ask the platform team which values were used in the sizing tests, because the right numbers depend on your database and Redis latency. The step is done when the probe settings are recorded next to the measured response times, and a repeat measurement under load stays within the timeout.
Test removal and return in staging
In a staging environment, the platform engineer stops the Redis service or blocks the router's network path to one dependency, then watches the readiness status of each router pod and the endpoints behind the service. Confirm that the affected pods leave the ready set and that traffic stops reaching them, then restore the dependency and confirm the pods return to ready without a restart. Record the time each transition took and any errors seen in logs. The step is done when both removal and return are observed and the results are filed with the release versions, so the same test can be repeated after each upgrade.
Readiness, liveness and startup: when each probe should fail
The readiness probe decides whether a pod receives traffic. When it fails, Kubernetes removes the pod from the Service endpoints, so requests stop reaching it, but the container keeps running and is not restarted. This is the right place for the deep health check, because a router pod that cannot reach PostgreSQL, Redis or a vault should stop accepting payment requests until the dependency recovers. Failing readiness is a traffic decision, not a repair action.
- Correct use: Point the readiness probe at the deep health endpoint so that database, Redis, vault and outbound connectivity checks gate traffic.
- Shared dependency failures: If PostgreSQL fails, every pod can become unready at once, which leaves no endpoints behind the Service. Confirm how your ingress handles an empty endpoint set.
- Timeouts: Set
timeoutSecondsabove the slowest expected dependency response, so a slow but working replica does not drop out of rotation. - Failure threshold: Use
failureThresholdto require several consecutive failures before removal, which absorbs brief network blips. - Outbound checks: A failing processor connectivity check removes every pod from rotation for a processor-wide problem. Confirm with Hyperswitch which checks are included before relying on them for traffic decisions.
Before go-live, simulate a single dependency outage in a test environment and confirm that pods leave the endpoint list and return after recovery.
The liveness probe answers one question: is this process stuck in a state that only a restart can clear? When it fails repeatedly, the kubelet restarts the container. A liveness probe should therefore check only the process itself, such as a lightweight HTTP response from the server, and should never call PostgreSQL, Redis, the card vault or any processor. A restart does not restore a database, cache or processor connection, so a liveness check that depends on them turns an external outage into a restart loop across the whole fleet.
- Process-only check: Use a simple endpoint that proves the application loop responds, not the full deep health check.
- Restart storm: If liveness calls the database and PostgreSQL slows under load, every pod restarts at once, which reduces capacity exactly when traffic is highest.
- Restarts do not fix outages: A PostgreSQL primary outage needs failover or recovery on the database side. Restarting router pods only adds connection churn and cold caches.
- Generous thresholds: Set
initialDelaySeconds,periodSecondsandfailureThresholdconservatively so a temporary CPU spike does not trigger a kill. - Verify the endpoint: Confirm with Hyperswitch which path is safe for liveness in your chart version, because the deep health path is not meant for this purpose.
Check that a simulated database outage leaves restart counts unchanged, which shows liveness is independent of dependencies.
The startup probe holds off the liveness and readiness probes while a container initializes. It exists for slow starts, such as applications that run migrations, load configuration or wait for dependencies on first boot. While the startup probe has not yet succeeded, Kubernetes does not run liveness or readiness checks, so a slow start is not mistaken for a hang. Once startup succeeds, the other probes take over for the rest of the container's life.
- Budget for first boot: Size the startup window (
failureThresholdmultiplied byperiodSeconds) to cover the slowest expected initialization, including database migrations after an upgrade. - Upgrade-time behavior: Migration work during an upgrade can take far longer than a normal start, so test the window against a realistic copy of your database.
- Dependency waits: If the startup check includes a dependency, a database outage during deploy will stall the rollout, which is usually the intended result.
- Avoid long liveness delays: Teams sometimes raise
initialDelaySecondson liveness to cover slow starts. A startup probe is the cleaner tool for that job. - Rollout visibility: Watch for pods stuck in startup during a release, because the Deployment may look slow rather than broken.
Confirm the startup window against measured boot and migration times from your own staging environment, not from defaults.
Most probe incidents come from a few predictable settings. A dependency blip becomes a restart loop when the liveness probe calls an external service, when timeouts are shorter than normal latency under load, or when one threshold is set to fail after a single error. The result is usually visible as rising restart counts and a Service that flaps between full and empty. The fix is almost always to move dependency checks out of liveness and to add headroom to timeouts and thresholds.
- Dependency checks in liveness: The most damaging mistake. Keep liveness local to the process.
- Tight timeouts: A one-second timeout on a check that normally takes slightly less can fail under load and remove healthy pods.
- Single-failure thresholds:
failureThresholdset to 1 converts one dropped connection into a removal or restart. - Same endpoint for every probe: Using the deep health check for liveness, readiness and startup gives all three the same failure behavior and removes the separation the probes are meant to provide.
- Ignored restart counts: A rising restart count after a database event is evidence of a liveness misconfiguration, not of a database problem alone.
Review the rendered Deployment manifest after every chart upgrade, because default probe values can change between releases.
Securing the health endpoint and its responses
A deep health check touches the database, Redis, the vault and outbound paths, so its responses can reveal more about your payment stack than a simple liveness check. The cards below cover who can call the endpoint, what it may disclose, how its probes authenticate, and how failures are recorded.
Restrict who can call the endpoint
Treat the health route as an internal interface, not a public one. Confirm in your release whether the endpoint requires any authentication, and if it does not, limit callers at the network layer using allow-listed source ranges, a service mesh policy or Kubernetes NetworkPolicy so only the kubelet, monitoring agents and the load balancer health checker can reach it. Check the behavior of every route Hyperswitch exposes on the router port before you rely on path-based rules.
Self-hosting docsKeep connection details out of responses
A failing check can echo hostnames, ports, database names or driver errors that map your internal topology. Before go-live, call the endpoint with each dependency stopped and read the full response body and headers. Confirm that connection strings, usernames, internal service names and stack traces are not returned, and ask your Hyperswitch contact which fields are configurable for error detail.
Stop probes from sending payment data
Outbound connectivity checks should prove that a connector endpoint is reachable, not submit a real authorization. Confirm that the connectivity check uses no card data, no live merchant credentials and no sandbox transactions that appear in processor reports. Where a check must exercise a processor, use a dedicated test account at the processor and document who owns it, so a probe never creates a settled payment.
Manage credentials the probe needs
The deep check uses the same database and Redis access as the router, which means its credentials are another place secrets can leak. Store them in your secrets manager, mount them as files or short-lived secrets rather than plain environment variables where your platform allows, and give the check a read-only or minimal role where the database supports it. Confirm rotation steps with your release notes so a rotated password does not turn every pod unready at once.
Log failure events for audit
A readiness failure removes a pod from traffic, so the event history is evidence during an incident review. Make sure failed checks produce structured logs with timestamp, dependency name, pod and result, and forward them to your central log store with retention that matches your audit policy. Confirm whether the router logs failed health checks by default and whether those logs include the response detail you have chosen to hide from callers.
Keep the endpoint off public ingress
Ingress rules generated from a Helm chart can expose every path on the router service, so check the rendered manifests before applying them. Confirm that no Ingress, Gateway route or external load balancer forwards the health path to the internet, and that a separate internal listener or port is used for probes where the release supports it. Test from outside the cluster after every chart upgrade, since route defaults can change between releases.
Reading failure responses without misdiagnosing the outage
A failing deep health check tells you which dependency reported unhealthy, not why. Start by reading the response body and identify the component that failed: PostgreSQL, Redis, the card vault, or outbound connectivity. Confirm the exact field names and status values on the version you run, because they can change between releases, and record a sample response from a healthy pod so your team has a baseline to compare against. Then check whether the failure is shared or local. If every router pod fails the same check at the same time, suspect a shared dependency such as the database primary, a Redis failover, or a credential rotation. If only some pods fail, compare them against each other: a single node, a stale connection pool, or a pod that started before a secret was updated points to a pod-local cause.
Before you blame the dependency, rule out the network. A check that fails only from inside the cluster may come from a NetworkPolicy that blocks egress, a DNS lookup that resolves to a stale or missing record, or a proxy setting that changed. Test the target from a debug pod in the same namespace, using the same hostname and port the application uses, and compare the result with a pod in another namespace. Correlate the failing timestamps with kubectl describe pod events, probe failure messages, restart counts and the router logs, and with changes made to the cluster, secrets or network rules in the same window.
Treat a failing check as the start of a runbook, not a signal to restart pods. Restarting router pods during a database or Redis outage adds connection churn and can hide the evidence you need, and in a payment path it can also interrupt in-flight requests. Your runbook should name the owner for each dependency, the steps to confirm the failure from outside the application, the threshold at which traffic is drained, and who approves any rollback or restart. Practice this path before go-live, so the on-call team can tell a real dependency outage from a misconfigured probe without guessing.
Limits to confirm before relying on the health check
The deep health check is only as useful as what it actually tests in your release and deployment. The cards below list the points to confirm with Juspay release notes and your own load test before you wire the endpoint into readiness probes or rely on it during upgrades.
Dependency checks in your release
Confirm that the release you run exposes a health check covering each dependency you care about: PostgreSQL primary and replica, Redis, the card vault and outbound connectivity. A check that reports only the router process being up will pass while payments fail. Read the release notes for the version you plan to deploy, then test each dependency by stopping it in a non-production environment and watching the response change.
Hyperswitch releasesVault and outbound checks in Helm values
Find out whether the vault and outbound connectivity checks are enabled by default in your chart values or need explicit configuration. Review the values file you deploy from, not only the documentation, because a disabled check looks healthy. Record the exact keys that control each check so that a later Helm upgrade does not silently reset them.
Check latency and load on dependencies
Measure how long the deep check takes under normal and peak traffic, and whether each run opens connections or queries PostgreSQL and Redis. Probes fire on a fixed interval across every pod, so an expensive check can add meaningful load to the database that payments depend on. Set probe timeouts from measured results, and confirm the behavior in your own load test rather than assuming it is cheap.
Readiness of the Scheduler
Confirm whether the Scheduler producer and consumer expose their own readiness signal. The Router health check does not tell you whether the scheduler queue is being worked, so a healthy router can sit beside a stalled scheduler. Ask Juspay which endpoint or metric reports scheduler health for your release, and add an alert on queue backlog if no probe covers it.
Behavior during planned upgrades
Check how the endpoint responds during rolling upgrades and during dependency changes such as the Superposition requirement introduced in v1.124.0. A pod can report not ready while a required service is missing, which may remove it from traffic in a way you did not plan. Rehearse the upgrade in a staging cluster and watch readiness, replica counts and error rates at each step.
Release notesVerification under your own load test
Treat the health check as a claim to verify, not a guarantee. Run a load test that combines normal traffic with a deliberate failure of Redis or a PostgreSQL replica, and confirm that readiness changes at the point you expect and that pods recover once the dependency returns. Keep the results with the sizing record so the probe settings can be defended after each infrastructure change.
Questions teams ask before wiring health checks into production
How much effort does wiring deep health checks into production take?
Effort scales with the number of clusters, how many dependencies the deep check touches, how much monitoring already exists and how changes pass through your change control. Each dependency needs a test that fails when that dependency is down, plus a decision on whether that failure should take the pod out of traffic. Most of the cost is engineering time from platform and SRE staff, plus staging environments and repeated load test runs to confirm probe timing. Ask any partner for a quote that lists the clusters, dependencies, environments and change approvals it assumes, so you can compare it with your own estimate.
Can our own platform team validate health checks without a partner?
Yes, if your team already runs Kubernetes probes, can edit the Hyperswitch Helm deployment in staging and knows the PostgreSQL and Redis topology behind it. The gaps that usually remain are failure-mode testing, where each dependency is deliberately disabled, and a clear mapping from each failing response to a probe result and an action. A partner can supply a second set of hands for that scoped testing and for the runbook. Ownership stays with your team after handover, so the decision on what the check should fail on belongs to the people who will be paged.
What does the work need from our team?
Four things are needed. First, cluster access with rights to change Helm values and deployments in staging and production. Second, a staging environment that uses the same kinds of dependencies as production, including a replica database, Redis and the card vault where you run one. Third, load test results that show how probe timing behaves under traffic, so thresholds are not set on an idle cluster. Fourth, an on-call runbook that explains what each failing check means, who acts and when to roll back. Confirm the self-hosting steps for your Hyperswitch version in the Hyperswitch self-hosting docs before you start.
How long does validation take before a go-live?
No fixed duration applies, because it depends on your release cadence, the test scope and how many environments must pass. Hyperswitch ships roughly monthly minor releases, as listed on the Hyperswitch releases page, and each release can change dependency behavior, so probes should be rechecked after each upgrade. A narrow scope that covers readiness wiring and a few dependency failures takes less time than a scope that also covers chaos tests, several clusters and sign-off by an external reviewer. Ask for a timeline in the written scope, with each test phase and the environments it needs listed separately.
Should a deep health check be used for liveness probes?
No. A liveness probe tells Kubernetes to restart a container, so a check that depends on PostgreSQL, Redis, the vault or an outbound processor endpoint will restart healthy pods during a shared outage. Restarts do not repair a database or processor problem, and they can add load when pods are already struggling. Use a light liveness check that confirms the process is responding, and reserve the deep check for readiness, where a failing pod is removed from traffic until its dependencies recover. Keep outbound connectivity checks out of liveness, and set the failure threshold so a brief blip does not trigger a restart.
How do deep health checks interact with autoscaling and upgrades?
Readiness controls which pods receive traffic, while the Horizontal Pod Autoscaler scales on its configured metrics. Pods that are not ready do not serve requests, so a failing shared dependency can remove capacity from every router pod at once, and scaling out will not help if the new pods fail the same check. Set probe timeouts and failure thresholds with load in mind, so brief spikes do not drain the pool. For upgrades, the v1.124.0 release required a Superposition service before upgrading, which shows that dependencies can change between releases. Retest probe behavior on each upgrade, and confirm the health response in the release notes for the version you run.
Who is responsible for probe failures after go-live?
Your organization owns probe failures after go-live, including the runbook, alert routing and any decision to change thresholds. A partner can design the checks, test the failure modes, document each response and hand over the runbook, but the day-to-day response runs on your on-call rota. Ask in the written scope which deliverables are handed over, whether tuning is included after go-live and whether a retainer for ongoing support and upgrade testing is needed. Clear ownership avoids the common gap where a readiness failure is seen by several teams and acted on by none.
How DeployOpen scopes and delivers Hyperswitch readiness work
DeployOpen plans, implements, hardens, documents and supports self-hosted open-source platforms inside your own cloud accounts, data centers or air-gapped networks. For Hyperswitch health checks, that means agreeing in writing which dependencies the deep health endpoint must cover, wiring it into your readiness probes, and handing over runbooks your platform team can operate.
How we scope
- Inventory which Router, Scheduler and dependency checks your deployment exposes, and confirm the endpoint behavior against your Hyperswitch version.
- Agree in writing which connectivity checks (PostgreSQL, Redis, vault, outbound processor paths) are in scope and which are out.
- Confirm your Kubernetes distribution, probe configuration and alerting stack before any work starts, so the scope matches your environment.
How we build
- Configure liveness and readiness probes so a failed dependency removes a pod from traffic without triggering unnecessary restarts.
- Test each dependency failure in a non-production cluster and record the response code and body that each failure produces.
- Set probe timeouts and thresholds against load test results from your own environment, and document the values and their reasons.
How we hand over
- Deliver a runbook that maps each failure response to its likely cause, owner and first diagnostic step in your environment.
- Provide the Helm values, manifests and version notes as code in a repository your team controls, with change history.
- Walk your platform and on-call engineers through the failure drills and record which checks they can repeat without us.
How we support
- Retest probe behavior after Hyperswitch upgrades, dependency changes or changes to the Kubernetes cluster.
- Ongoing support, upgrades and continuous testing are available as a retainer, with scope agreed in writing.
- Request a quote from a written scope. DeployOpen does not publish a price list, so cost follows from the agreed deliverables and retest cycles.

