Load testing a self-hosted Hyperswitch before go-live

A self-hosted Hyperswitch needs a load test before go-live to confirm that router pods, PostgreSQL and Redis hold the expected transaction rate. This page covers test plans, sandbox connectors, metrics and repeat testing.

On this page

Why load testing a self-hosted Hyperswitch is a go-live gate

A sizing spreadsheet is a hypothesis, not evidence. A team that has worked out router pods, database connections and Redis capacity on paper still needs proof that the stack holds under the traffic it expects before live payments arrive. A load test is the step that turns those assumptions into measured results. Hyperswitch is built from a Rust core app server with Router and Scheduler services, backed by PostgreSQL with a master and replica setup and by Redis for caching and the scheduler queue, according to the Hyperswitch architecture docs. Each of those components can become the bottleneck, and a test is the only way to see which one fails first in your environment.

A useful test confirms more than the router's throughput. It shows whether the Scheduler producer and consumer keep pace with background work while the API is busy, whether PostgreSQL connection usage stays within what the replica and pooling layer can serve, and whether Redis latency stays flat as cache and queue activity grows. It also shows how long p95 and p99 response times take to climb as load approaches your planned ceiling. Confirm with Juspay's current guidance which Scheduler and database settings they expect you to observe during a run, since the architecture docs describe the components but the exact limits depend on your version and configuration.

Teams should run a test at three points: before the first live traffic, after any change to infrastructure that affects the payment path (database sizing, Redis topology, node pools, ingress or the monitoring stack), and before a Hyperswitch upgrade that changes dependencies. Release notes can add required services, as v1.124.0 did when it made Superposition a required dependency, so a repeat test after upgrades is part of the gate, not an optional extra. Treat the test results as a signed-off record that the go-live decision references, with the versions and configuration tested written down.

How the load test traffic reaches the stack

The load generator sends simulated merchant requests through ingress into the Router pods, which call the sandbox connectors and the card vault and read and write PostgreSQL and Redis. The Scheduler producer and consumer share the same database and Redis, so their load can show up during a test. Each component should report to the metrics backend, and the team should check that every hop is visible before trusting the results.

Load test request path and the components that report metrics during the test.

Which kinds of load test to run before go-live

A single load test proves very little on its own. Baseline, sustained, spike, soak and failover-under-load tests each answer a different sizing question, and together they show whether the capacity plan holds under normal, peak and degraded conditions. The pass or fail thresholds come from your own capacity plan, not from a general rule.

Baseline test at expected volume

A baseline run sends traffic at the volume your capacity plan expects on an ordinary day and records latency, error rate and resource use per component. It proves the sizing is correct at normal load and gives you the reference numbers every later test is compared against. It misses behavior at peak, so it should never be the only run before go-live. Record the router pod count, database connections and Redis memory at this level so later changes have a fixed point to measure against.

Sustained load at peak volume

A sustained test holds traffic at the planned peak for a long enough window that queues, connection pools and autoscaling settle into steady state. It shows whether router pods, PostgreSQL connections and Redis keep up at the number your plan calls peak. Confirm the peak figure with the business owner before the run, because a test at the wrong number proves the wrong thing. Watch for error rates that climb slowly rather than failing outright.

Spike test for sudden bursts

A spike test jumps from low traffic to a high rate within a short period, which is how payment events often arrive after a promotion, a retry storm or a processor recovering from an outage. It checks how fast the Horizontal Pod Autoscaler adds capacity and whether the database and Redis absorb the burst while new pods start. It does not show what happens over hours, so pair it with a soak run. Note how long recovery takes once the spike ends.

Soak test for slow resource growth

A soak test runs moderate load for an extended period to expose problems that only appear over time, such as connection leaks, growing table sizes, log volume and memory creep in Redis or the router. Payment platforms accumulate state continuously, so a short test can look clean while the database slowly degrades. Compare the start and end of the run for each metric. The duration should come from your own retention and batch schedules, which you should confirm with your operations team.

Failover under load

A failover test removes a PostgreSQL primary, a Redis node or a router pod while traffic is running, then measures how many requests fail, how long writes stall and whether retries preserve payment state. It proves the high availability design works under real traffic rather than on an idle cluster. Agree the injection method and abort conditions in writing first. Chaos testing of the wider critical path is covered separately, so keep this run focused on the failover mechanics you have already built.

Choosing a test environment and connector setup

The Hyperswitch docs offer a hosted sandbox for testing, which is the fastest way to start exercising the API and connector flows without standing up infrastructure. It is useful for checking request shapes, webhook handling and routing logic. It does not tell you how your own router pods, database and Redis behave under your traffic, because the capacity beneath the sandbox is not yours to size or tune. Treat it as a functional and integration check, not as evidence for capacity.

  • Fidelity: Results describe the hosted service, not your Kubernetes limits, database connection pool or Redis latency.
  • Cost: Little or no infrastructure cost for you, but test volume may be subject to limits set by the sandbox provider. Confirm those limits before planning.
  • Data isolation: Test data sits outside your environment, which suits functional testing but not tests that must mirror your own data handling controls.
  • Repeatability: You cannot rebuild the environment after an infrastructure change, so it cannot confirm sizing after upgrades.
  • Use: Confirm the request and webhook flows work before you move to a cluster you control.

Before relying on it, confirm with the vendor what the sandbox guarantees for throughput and what changes it may make without notice.

Metrics to collect during each load test run

The table lists what to record for each component during every load test run, what a bad reading usually points to, and where the number comes from in the monitoring stack. Compare each run against your own baseline and the sizing targets you wrote down before testing, since no universal thresholds are published here. Treat any row that drifts upward while throughput stays flat as the first place to investigate.

ComponentWhat a bad reading indicatesWhere the metric comes from
Router request rate and latencyLatency climbing while request rate plateaus usually means a bottleneck downstream, such as the database, Redis or connector calls, rather than the router itself.Router metrics scraped into the monitoring stack, viewed in Grafana dashboards. Confirm metric names in your deployed chart version.
Error rates by processorA rising error rate for one processor under load often points to sandbox rate limits or connector timeouts, not to Hyperswitch sizing. Separate these before tuning pods.Payment outcome metrics labeled by connector, plus sandbox connector logs. Check the connector's own rate-limit documentation.
Pod CPU, memory and autoscaler eventsPods pinned at CPU limits with scaling lagging behind load suggests minimum replicas or autoscaler settings are too low. Memory growth that does not recover between steps suggests a leak or undersized limits.Kubernetes metrics server or Prometheus node and container metrics, plus Horizontal Pod Autoscaler events from kubectl describe or cluster events.
PostgreSQL connections and replica lagConnections near the configured maximum or queued connection waits mean the database caps how many router pods can serve traffic. Growing replica lag means reads may return stale data during the test.PostgreSQL exporter metrics for connections and replication, plus pg_stat_activity queries run during the test. Confirm the exporter used by your monitoring chart.
Redis memory and latencyMemory approaching its configured limit or rising command latency indicates cache, idempotency or scheduler keys are growing faster than expected. Evictions during a payment test are a serious finding.Redis exporter metrics and the INFO and latency commands run against the instance. Ask your platform team which memory policy is configured.
Scheduler queue depthA queue that keeps growing after load stops means consumers are not keeping up, and scheduled work such as card data deletion may fall behind.Scheduler queue state in Redis and consumer pod metrics. Confirm the queue key names for your release before writing alerts.

Running the Hyperswitch load test step by step

This sequence takes a self-hosted Hyperswitch from unconfirmed sizing assumptions to a documented load test result, with a stop criteria record and a findings review that decides whether go-live can proceed.

  1. Confirm sizing inputs and test plan

    Before any environment is built, the team writes down the expected transaction volume, peak multiplier, payment mix by method and processor, and the target latency and error budget. The owner is the platform lead with input from the payments product owner. Confirm the sizing inputs against the capacity planning work for your traffic, and agree the test scenarios, including success and decline paths, webhook volume and any retry behavior. The step is complete when a written test plan lists each scenario, its target load, its pass criteria and the person who signs it off.

  2. Deploy a matching staging environment

    Build a staging cluster that mirrors production, using the same Helm chart version and the same values files, so that router replicas, scheduler pods, PostgreSQL primary and replica, Redis and ingress match production settings. The platform team owns this, and differences such as node size, storage class or replica count must be recorded in a deviation log with the reason for each one. The step is done when a diff of production and staging values shows only the documented deviations, and the health endpoints report healthy for every component.

  3. Configure sandbox connectors and test merchants

    Connect the processors you plan to use in production to their sandbox or test environments, and create dedicated test merchant accounts with separate API keys. Confirm with each processor what its sandbox rate limits and response behavior are, because a sandbox can throttle or respond differently from live acquirers, which limits what the test can prove about processor latency. Keep test credentials out of shared notes and store them in your secrets tooling. The step is complete when a single test payment and a single refund succeed through each connector and the webhooks arrive at the staging endpoint.

  4. Establish a baseline at low load

    Run the agreed scenarios at a small fraction of the target load to confirm the test harness itself works and to record baseline latency, error rates and resource use for each component. The load generator should run outside the cluster so that it does not compete for the same nodes. The engineer running the test records the figures in the results log. The step is complete when repeated low-load runs produce consistent numbers, so the team knows that differences seen later come from load and not from the harness.

  5. Ramp load in stages

    Increase load in defined steps toward the target peak, holding each level long enough to see whether latency and error rates settle. Watch the database connection counts, Redis latency and pod restarts at each level, not only the request rate. The test lead decides when to move up a level based on the agreed criteria, and no one changes configuration mid-run without logging it. The step is complete when the target peak has been held for the planned period, or a stop criterion has been reached and recorded.

  6. Collect metrics and record results

    Gather router and scheduler metrics, PostgreSQL and Redis metrics, node and pod resource use, and processor-level success and failure rates from the monitoring stack, and store them with the run identifier. Record the stop criteria that were agreed in the plan and whether each was triggered, along with the time and the component involved. The result is a run record that someone who did not run the test could read and understand. The step is complete when each run has a stored dashboard snapshot, a log export for the window, and a one-page summary of pass or fail against the plan.

  7. Review findings and repeat after changes

    The team reviews each failed or marginal scenario, identifies the limiting component (for example database connections, pod density or Redis), and decides whether to change sizing or autoscaling settings and rerun. The review also decides whether go-live can proceed on the evidence. Any change to infrastructure, Helm values, chart version, database or Redis configuration later means the affected scenarios are repeated, and the same plan and run record format are used so results compare directly. The step is complete when the review signs off the go-live decision and the rerun triggers are written into the operations runbook.

How sandbox connectors shape what a load test proves

A load test run against sandbox connectors measures Hyperswitch plus whatever the processor sandbox does under your traffic, and the sandbox usually behaves differently from live processors. Test sandboxes often apply their own rate limits, queueing and response times, and those limits can throttle your run before your Hyperswitch pods are under pressure. Treat sandbox results as a floor for orchestration overhead, not a forecast of live authorization latency or throughput.

To separate Hyperswitch overhead from processor response time, record latency at each hop rather than only end to end. Compare the time spent inside the router for request handling, routing decisions, vault calls and database and Redis access against the time spent waiting on the connector. Use a stub or mock connector for one run to isolate the core path, then repeat with the sandbox connectors to see how much of the total the processor adds. Tag every transaction with its connector so that failures and slow responses can be grouped by processor in the results.

Before the test, ask each processor in writing for the rate limits, concurrency caps, daily or monthly call quotas and any scheduled maintenance that apply to its test environment, and confirm whether those limits can be raised for your test window. Also confirm whether the sandbox returns realistic decline codes and timeouts, since a sandbox that approves everything will understate retry and fallback load. Record these limits in the test plan so that a result showing throttling is read as a sandbox constraint, not a sizing failure.

Load testing Hyperswitch: cost, effort and what you need

How long does it take to plan and run a Hyperswitch load test?

No duration is published in the researched facts for the Hyperswitch Suite load test, so treat any number you hear as a question to confirm, not a planning figure. The effort is driven by how many test scenarios you need, how many connectors are sandboxed, how long the environment takes to build, and how many rounds of tuning follow the first run. Plan time for four stages: writing the test plan with target transactions per second and failure thresholds, building a production-like environment, running and analyzing the tests, and fixing bottlenecks before a retest. Ask any partner to break its estimate into those stages so you can see where the time goes.

Can our own team run the Hyperswitch load test without a partner?

Yes, if your team already runs Kubernetes, PostgreSQL and Redis in production and has someone who can read database and connection metrics under load. Hyperswitch is open source under Apache 2.0, so the test tooling and the Helm-based deployment are available without a license purchase. The skills that are hard to hire for are capacity analysis and interpreting failures across the router, the database, Redis and the connector sandboxes. A partner adds the most value when the first run exposes a bottleneck and you need a second and third run in a short window.

What infrastructure and test data does a Hyperswitch load test need?

You need a non-production environment that matches production in shape: the same router and scheduler services, PostgreSQL with its master and replica setup, Redis, the card vault and the network paths to connectors. Scaling the test down can hide the limits you are trying to find, so state the scale difference in the test plan. For test data, you need merchant accounts, API keys and connector configurations pointed at sandbox processors, not live ones. Confirm with the Hyperswitch docs and your processors which sandbox endpoints and rate limits apply, because a sandbox that throttles you will look like a Hyperswitch failure.

How do we repeat load tests after a Hyperswitch upgrade or database change?

Repeat the test whenever something on the payment path changes: a Hyperswitch release, a Control Center or SDK version change, a PostgreSQL version or schema change, a Redis configuration change, or a change to pod resource limits. Keep the test plan, scenario scripts and metric dashboards in version control so each run uses the same inputs. Compare results against a baseline from the previous run, not just against the target. Hyperswitch ships roughly monthly minor releases, so build the rerun into your upgrade checklist rather than treating it as a one-time go-live task.

What should a partner quote for a Hyperswitch load test include?

A quote should follow from a written scope and list each deliverable and its acceptance point. Ask for the following items: the test plan and target transactions per second, the environment build and its differences from production, the sandbox connector setup, the scenarios and failure thresholds, the metrics collected at each run, the analysis report, and the number of retest rounds included. Also ask what is one-time work, such as the initial build and tuning, and what recurs, such as retests after upgrades. DeployOpen does not publish a price list; a quote follows from the agreed written scope.

Which metrics should we collect during a Hyperswitch load test?

Collect metrics at four layers so a failure can be traced to its source. At the application layer, record success and failure rates, latency at the percentiles you have committed to, and router pod restarts. At the data layer, watch PostgreSQL connection counts, replication lag and query latency, along with Redis memory and latency. At the connector layer, record sandbox response times and error codes by processor. At the infrastructure layer, track CPU, memory and node pressure. The Hyperswitch monitoring chart and your existing observability stack can supply most of these; confirm which series they expose in your own environment before the first run.

Does a load test confirm that our Hyperswitch deployment is compliant?

No. A load test shows how the platform behaves under volume and whether your sizing holds, but it does not establish PCI DSS scope or compliance. Where the card vault and data handling sit in your architecture determines what a compliance assessor examines, and only independent auditors and certification bodies issue reports or attestations. DeployOpen prepares systems and evidence for those assessments, and load test results can be part of that evidence, but they are not a compliance finding.

Security and data handling during load tests

Load tests push large volumes of card-shaped data through the same paths that carry live payments, so the test plan has to control where that data goes, who can reach it and what it does to your PCI DSS scope. The cards below cover the data, network, credential and scope decisions to settle before the first test run.

Synthetic card data handling

Load tests need card numbers that pass format checks but never belong to a real cardholder. Use only test PANs that the sandbox connector documents, generate them from a fixed list, and record which list version each run used. Never load real cardholder data into a test environment. Confirm with your QSA whether the test environment is in scope before any data moves, because a test environment that handles real PANs is in scope by default.

Vault deployment docs

Keeping test PANs out of logs

Load generators, router pods, the vault and the monitoring stack all write logs, traces and metrics labels, and a test PAN that lands in any of them becomes a data handling finding. Set log levels for the load test to avoid request bodies, check that ingestion pipelines mask or drop card fields, and grep a sample of stored logs after each run. Treat dashboards and exported result files as sensitive until you have confirmed they contain no card-shaped strings.

Isolating the test network from processors

A load test must never send traffic to a live processor endpoint, because a misconfigured connector can turn synthetic transactions into real authorizations. Point every connector at its sandbox base URL, block egress to production processor hosts at the network layer, and confirm the egress allow list in a dry run. Route outbound calls through the same proxy path you use in production so the test exercises it, but with the sandbox destinations only.

Scoping sandbox credentials

Sandbox API keys, webhook secrets and connector credentials should be separate from production values, stored in your secrets manager and issued to the load test account only. Limit the test Control Center user to the merchant profile used for the run, rotate the keys after the test, and remove them from load generator configuration. Confirm with each processor how its sandbox keys are issued and whether they expire.

Loading card data through the vault

Every synthetic card that passes through the vault is a card the vault stores, so the test changes the data footprint of your environment. Which vault model you run decides whether that footprint stays in your scope. With the in-house model, the Hyperswitch docs state the merchant carries full PCI DSS responsibility, while an external vault or the SaaS vault changes what your systems hold. Settle the model before the test, not after.

Outsourced vault docs

Deleting test data after the run

Test cards, tokens and transaction records should not remain in the database, backups or analytics stores longer than the test needs. Plan a cleanup step that removes stored test tokens and payment records, confirm the retention job runs against the test database, and check that backup snapshots taken during the run are expired on the same schedule. Document the cleanup in the test report so an assessor can see when the data left the environment.

When to repeat the load test after infrastructure changes

A load test result is only valid for the stack that produced it. Repeat the test whenever something on the payment path changes, starting with a new Hyperswitch release. The project ships roughly monthly minor releases, and the Hyperswitch releases page lists each one with a compatibility matrix for Control Center and web client versions. Read the release notes before every upgrade, because a release can add a required dependency. Version 1.124.0, for example, made Superposition a required configuration dependency that must be running before the upgrade. Any change to the router, Scheduler or Control Center version should trigger a retest against the same plan.

Infrastructure changes trigger a retest too. Treat these as reasons to rerun the suite: a change to PostgreSQL sizing, connection limits, replica count or version; a change to Redis topology or persistence; a move to a different node pool or instance type; and any edit to Horizontal Pod Autoscaler minimums, maximums or targets. Adding a new processor connector also changes the load profile, since each connector adds outbound calls, timeouts and retry behavior that the earlier run never exercised. Confirm with your platform team which of these changes are logged in your change process, so no change reaches production without a retest decision.

Keep one baseline and compare every run against it. Store the test plan, sandbox connector configuration, Hyperswitch version, Helm values, database and Redis settings, node types and the full metric set from the first accepted run. For each later run, hold the workload profile constant so differences come from the infrastructure, not the test. Record throughput, latency percentiles, error rates by component and resource saturation side by side. Ask your load testing provider to show how they version test plans and results, and agree in writing where baselines are stored and who approves a new one.

How DeployOpen plans and supports Hyperswitch load testing

DeployOpen plans load testing for a self-hosted Hyperswitch stack as part of the go-live work, so the test confirms the sizing the team actually deployed in its own cloud accounts or data centers. The work is scoped in writing, built against the client's environment, and handed over with the evidence needed to repeat the test after infrastructure changes.

How we scope

  • Written scope names the Hyperswitch version, environments, cluster layout and the traffic profiles to be tested.
  • Scope records which connectors run against sandbox endpoints and which payment paths are excluded from the test.
  • Fixed-scope agreements set deliverables and timelines in writing before any load generator is configured.

How we build

  • Test plans map expected transactions per second to API request profiles, including retry and spike patterns the client confirms.
  • Load generators are configured with the Hyperswitch Suite load test and sandbox connector settings agreed during scoping.
  • Dashboards and metric collection are set up so router pods, PostgreSQL, Redis and processor response times are captured per run.

How we hand over

  • Deliverables include test plans, run results, observed bottlenecks and the sizing changes each result supports.
  • Runbooks document how to rerun the suite, the metrics to compare and the thresholds the client's team agreed on.
  • Handover sessions walk the client's platform and SRE engineers through the test setup so they can repeat it themselves.

How we support

  • Retainers cover repeat load tests after upgrades, infrastructure changes or new connector onboarding.
  • Support engineers review each new Hyperswitch release's effect on sizing before the client's production rollout.
  • Ongoing support is available as a retainer, with scope and frequency of retests agreed in writing.

Sources and further reading

Talk to our team.

Tell us what you're working on, whether it's a deployment, an audit, a security test or a cyber range. You'll speak with an engineer who can help you scope it.

  • 30-minute call: free, with no obligation.
  • NDA on request: we can sign before you share details.
  • Clear next steps: a scope and plan after the call.