Self-deploying the Hyperswitch routing service

Running the decision engine behind Hyperswitch intelligent routing in your own infrastructure, with the Docker setup, Hyperswitch connection, validation switch and production checklist planned before go-live.

On this page

When a self-deployed Hyperswitch routing service is worth planning

A self-deployed routing service is worth planning when a payments platform team wants the decisions that pick a processor for each payment to run in infrastructure it controls, and has the engineering capacity to operate a stateful service alongside Hyperswitch. In Hyperswitch, the routing service is the decision engine behind the intelligent routing strategies: auth-rate, volume-based, multi-objective (auth rate re-ranked by processor cost) and default fallback routing. Hyperswitch is an open source, composable payments platform maintained by Juspay and licensed under Apache 2.0, so the code that makes these decisions can be reviewed, pinned and run under your own change control.

The surrounding stack is the part to size before committing. Hyperswitch's core app server is split into Router and Scheduler services (the Scheduler has Producer and Consumer roles), backed by PostgreSQL with a master and replica setup and by Redis for caching and the scheduler queue. A routing service adds one more moving part to that picture, so the team needs owners for each dependency, backups and upgrades for PostgreSQL and Redis, and monitoring that shows whether routing decisions are arriving in time. Confirm with Juspay, through the Hyperswitch docs and the release notes for the version you plan to run, which services and configuration keys the routing service requires in your target release.

This path suits payments platform and platform engineering teams that already run Hyperswitch or are close to a production go-live, operate Kubernetes or a comparable container platform, and have a clear reason to keep decision logic in-house, such as data residency, audit requirements or a need to test routing changes against their own infrastructure. Teams that only need routing rules configured in the hosted service, or that have no one to own the database and cache layers, should compare that option first. A written scope with DeployOpen would cover which strategies go live first, how the service is deployed and how the decision is validated before traffic moves.

Deployment options for the routing service and when each fits

This table compares the three ways Hyperswitch documents running the decision engine behind intelligent routing: Docker-based local setup, Helm on Kubernetes with the cloud guides, and the hosted sandbox. Read each row against the environment you must control, the upgrade work you will own and who gets paged when routing decisions fail. The main takeaway is that only the Kubernetes path fits a production routing service you run yourself, and the sandbox is for testing only.

OptionBest fitControl and upgrade effortWho runs the stack
Docker-based local setupDeveloper laptops and short integration tests of routing rulesLow setup effort, but containers, data and upgrades are managed by hand and it is not sized for production trafficYour engineers, on a single host or local machine
Helm on Kubernetes with cloud guidesProduction self-hosting in AWS, GCP, Azure or your own clusterHighest control over networking, secrets and data residency, with upgrade steps you plan against each release and its compatibility matrixYour platform team, with your Kubernetes and database operators
Hosted sandboxTesting routing configurations and API calls before you build anythingNo infrastructure to run, but you cannot set your own data handling, retention or network boundariesJuspay hosts it; you only manage test merchant accounts
Sandbox as a production optionNot applicableNot a production option for live payment traffic under your controlConfirm the hosting and data terms with the vendor before any use beyond testing
Dependency services (PostgreSQL, Redis)Required in Docker and Helm paths; your own managed or self-run instancesYou own backups, upgrades and high availability for these in self-hosted pathsYour database and cache team, unless you use a managed service you select
Superposition serviceRequired configuration dependency for recent Hyperswitch versions, per the v1.124.0 release notesMust be running before you upgrade to that version, so plan it into both pathsYour platform team, alongside the Hyperswitch stack

Setup sequence for connecting the routing service to Hyperswitch

This sequence takes a self-hosted routing service from release selection to a verified Router connection, a validated non-production switch and staged routing strategies. Each step closes with a check, so the next step starts from a known state.

  1. Pin the Hyperswitch release and matrix

    The platform engineering lead selects the Hyperswitch release and records it in change control. Read the Hyperswitch releases on GitHub page and note the compatibility matrix for the Control Center and web client versions that pair with that release. If the release is v1.124.0 or later, confirm that a Superposition service is planned and running before any upgrade, because the release notes make it a required configuration dependency. Done when the release, matrix pairings and Superposition status are written down and approved.

  2. Prepare PostgreSQL and Redis

    The database and platform team provisions PostgreSQL and Redis for the Hyperswitch stack. Hyperswitch uses PostgreSQL with a master and replica setup, and Redis serves caching and the scheduler queue, so both must be reachable from the Router and scheduler hosts. Confirm that the PostgreSQL major version is still supported on the dates in the versioning policy (for example, version 14 is supported until November 12, 2026). Choose a Redis version and license your legal team accepts, since Redis 8 and later offer a choice among three licenses. Done when a connection test from each host succeeds and the versions and licenses are recorded.

  3. Start the routing service with Docker

    The platform engineer starts the routing service container using the Docker setup described in the Hyperswitch documentation. Pin the image to the version recorded in the first step, and keep credentials in a secret store rather than in the command line or image. Confirm in the routing documentation which backing services the container expects and point it at them. Done when the container reports healthy, its logs show no database or cache connection errors, and it listens on the port the documentation specifies.

  4. Confirm Router can reach the routing service

    The Hyperswitch operator sets the routing service address in the Router configuration and opens a network path from the Router hosts to the service, keeping the service off the public internet. Send a test request from a Router host and check the response. Confirm that the Superposition service is also reachable if your release requires it. Done when Router logs show the routing service connection established and a test request returns a routing decision with no timeout.

  5. Run the validation switch in non-production

    Enable the validation switch only in a sandbox or staging environment, using test merchant accounts and processor sandbox credentials. Send a set of test payments through the default configuration and compare the routing decisions with the processor order you expect. Confirm in the routing documentation how the switch reports results and whether it can change live decisions. Done when test payments produce reported routing decisions, the results match the expected processor order, and live traffic is unaffected.

  6. Set default fallback routing first

    Before any strategy is active, the operator configures the fallback processor order that applies when no rule matches or the chosen processor is ineligible. Test it with a payment that matches no rule, and with a payment whose first processor is marked ineligible in the test environment. Done when both test payments reach the expected fallback processor and the order is saved in the change record.

  7. Enable routing strategies one at a time

    The payments lead turns on one strategy at a time, starting with the simplest rule that matches the business need, and reviews its effect on approval rates before adding the next. Each strategy has its own prerequisites, so read the Hyperswitch intelligent routing documentation for each one and consider an A/B test before full rollout. Keep a tested path to revert any strategy to the fallback order. Done when each strategy's results are recorded against an approval rate baseline and a revert has been rehearsed.

Security controls to set before routing traffic flows

The routing service sits between your Router and your processors, so it inherits the same exposure to credentials, admin access and payment-adjacent data. These cards cover the controls to set and verify before any live traffic passes through it.

Network isolation between Router and routing service

Place the routing service on a private network segment that only the Hyperswitch Router can reach, and block direct access from the internet, from merchant workloads and from other internal services. Confirm which ports and paths the Router uses to call the service, and write those as explicit allow rules. Test that a connection attempt from any other host fails before you connect production traffic.

Self-hosting docs

Secrets and key handling

Store database passwords, Redis credentials and any service tokens in your secrets manager, not in Helm values files or container images. Rotate them on a schedule you document, and confirm that the Router and routing service read the same secret only where the design requires it. Ask your team to name the owner of each secret and where its rotation is recorded.

Admin access through OpenID Connect only

The Control Center supports single sign-on through OpenID Connect only, with no SAML, no JIT or SCIM provisioning, and roles managed inside Hyperswitch rather than from your identity provider. Invite named administrators in advance, keep the admin group small, and review the Hyperswitch role list before go-live. Plan a manual offboarding step, since deprovisioning will not follow your identity provider automatically.

Control Center SSO docs

Audit logging for routing changes

Routing rules and strategy changes alter where live payments go, so every change needs a traceable author and timestamp. Confirm which events the Router and Control Center record, where those logs are shipped, and who can read them. Keep logs outside the systems they describe so that an administrator cannot silently edit their own change history.

Keep raw card data out of routing

Card data is stored in the separate card vault, which the architecture docs describe as built for PCI DSS requirements. The routing service should receive only tokens, processor identifiers and decision inputs such as amount, currency and outcome codes. Review every payload and log line the service emits to confirm that no primary account number reaches it.

Vault deployment models

Match the vault model to your scope

Your vault choice determines how much of the stack falls into your PCI DSS scope. In the self-hosted, in-house PCI model, the Hyperswitch docs state that the merchant is fully responsible for PCI DSS certification and data handling. Before routing goes live, confirm with your assessor which deployment model you run and how the routing service's network position fits that scope.

External vault model

Router asks the routing service before it reaches any processor

The diagram starts at the merchant client, which sends payment requests to Router. Router asks the routing service for a processor order, then sends the authorization to the chosen processor. Router reads and writes PostgreSQL, where the primary takes writes and the replica follows it, while Redis handles cache and state. Scheduler uses Redis and PostgreSQL to run retry jobs. The card vault sits inside its own trust boundary, so check who can reach it. The validation switch is a non-production test route and should stay out of live traffic.

Request path, data stores and the separate card vault trust boundary.

Production checklist before the routing service goes live

Each check below is a verification to run in your own environment, not a guaranteed result. Together they test whether the routing decision path keeps working when a processor, a database node, a Sentinel or a release changes underneath it. Run them in a staging environment that matches production before traffic moves.

Default fallback routing configured

Confirm that a default fallback processor order exists for the merchant profile and that it is used when no rule applies or the chosen processor is ineligible. Without it, a routing decision that returns no eligible processor has no defined outcome. Test this by disabling the primary connector in staging and checking which processor receives the payment and that the attempt is recorded correctly.

Routing docs

Validation switch tested

Exercise the validation switch end to end before relying on it for production changes. Run the same test payments through the path with the switch on and off, then compare which processor was chosen and whether the decision matches what your routing configuration says. Record the expected outcome for each test so a mismatch is visible to the on-call team.

PostgreSQL high availability and backups

Confirm the routing data store has a standby that can be promoted, that failover is driven by an external tool because PostgreSQL does not detect primary failure on its own, and that point-in-time recovery has been restored in a test environment. Ask your DBA to document the recovery time you have measured, not the one you expect.

PostgreSQL failover docs

Redis Sentinel quorum

If Redis is used for caching or queues, confirm that Sentinel runs with at least three instances and that automatic failover promotes a replica during a test. Sentinel is not needed when Redis Cluster is used instead. Check that the application reconnects to the new master without a manual restart and that you know which Redis license terms apply to the version you deploy.

Minimum Sentinel instances
3

Monitoring and alert thresholds

Confirm that dashboards show decision latency, processor selection counts, fallback usage and error rates, and that alerts fire when fallback usage rises sharply or a processor disappears from decisions. Set thresholds from your own baseline traffic. Test each alert by triggering it in staging so you know the notification reaches a person.

Release and dependency compatibility

Check the Hyperswitch release notes and compatibility matrix for the version you deploy, and confirm the Superposition service required by v1.124.0 is running if you upgrade past it. Pin the versions of the router, Control Center and client SDKs together. A mismatch found in staging costs less than one found after a routing change reaches live traffic.

Hyperswitch releases

Rollback plan

Write down how to return to the previous routing configuration and the previous service version, who approves the rollback, and how long it takes to verify in staging. Keep the prior configuration exported and versioned. Practice the rollback once before go-live so the steps and access are proven, not assumed.

Questions buyers ask before self-deploying the routing service

How much does it cost to self-deploy the Hyperswitch routing service?

The cost has three parts: infrastructure, labor and ongoing operations. Infrastructure is what you pay your cloud or data center provider for Kubernetes, PostgreSQL and Redis. Labor is your team's time or a partner's fixed-scope fee, and DeployOpen does not publish a price list, so a quote follows from the written scope. Design, build and validation are one-time costs. Running the stack, applying each Hyperswitch release and maintaining PostgreSQL and Redis recur. The main drivers are the number of environments, whether PostgreSQL and Redis are highly available (Redis Sentinel needs at least three Sentinel instances), how many processors and routing strategies you configure, and how much testing your compliance team expects. Ask any quote to separate one-time and recurring items.

How long does a working routing service setup take?

No duration is supplied for this work, so any timeline should be confirmed in writing against your own environment. The routing service connects to a running Hyperswitch deployment, so the schedule depends on whether your cluster, PostgreSQL and Redis already exist and whether they meet your standards. It also depends on how many validation rounds your team needs before the first live traffic. Dependencies on the Hyperswitch stack can add time. Hyperswitch v1.124.0 made Superposition a required configuration dependency, and a Superposition service must run before upgrading to that version. Ask for a timeline that lists each milestone and the environment it applies to, and flag any dependency your team has not yet built.

What does our team need to provide for the deployment?

Your team needs to provide the infrastructure and decisions that the deployment depends on:

  • Access to the cloud accounts, clusters or data centers where the stack will run, with separate non-production and production environments
  • A running Hyperswitch deployment and a chosen release, with its Control Center and SDK versions checked against the compatibility matrix
  • Decisions on PostgreSQL and Redis hosting, including the major version, replica count and whether Redis runs under Sentinel
  • Processor test credentials and merchant accounts for validation
  • Named owners for change approval, on-call response and security review of the configuration

Missing items usually delay the work more than the technical build itself, so confirm each one before the scope is signed.

Can our engineers deploy the routing service without outside help?

A team with solid container, Kubernetes and PostgreSQL operations experience can often do it in-house, because Hyperswitch publishes its self-hosting documentation. The harder parts are rarely the first install. They are high availability for PostgreSQL and Redis, safe credential handling, validating routing rules before they affect live traffic, and planning upgrades on a monthly release cadence. Ask whether at least two engineers can operate each component, whether someone owns the on-call rota, and whether a staging environment mirrors production. If those answers are no, a fixed-scope engagement can cover the build and handover, and a retainer can cover ongoing upgrades and testing. Read the Hyperswitch self-hosting guide before deciding.

Do Redis licensing terms affect a self-hosted routing service?

They can, and the answer depends on the Redis version you deploy. Redis Open Source 8.0 and later can be used under the Redis Source Available License v2, the Server Side Public License v1 or the GNU AGPLv3, at your choice. Redis 7.4.x to 7.8.x use RSALv2 or SSPLv1, which are not OSI-approved. Redis 7.2.x and earlier remain under BSD-3-Clause. According to the Redis licenses FAQ, teams moving from Redis 7.2 or earlier with unmodified artifacts see no impact, but teams that offer modified Redis code as a network service must make that modified source available to the service's users. The Intel SVS-VAMANA optimizations are only usable under RSALv2. Have your legal team confirm which license applies to your build.

Does PostgreSQL licensing create obligations for our team?

PostgreSQL is released under the PostgreSQL License, a permissive license similar to BSD or MIT, so licensing is rarely the constraint. The operational question is version support. According to the PostgreSQL versioning policy, version 14 is supported until November 12, 2026, while versions 15 through 18 are supported into 2027 and later. Plan a major upgrade before your current version leaves support. Minor releases arrive at least every three months, never change the storage format, and mean replacing executables and restarting. Major upgrades can use pg_upgrade, a dump and restore, or logical replication, which the PostgreSQL upgrading documentation says can limit downtime to several seconds. This is general information, so confirm the terms with your legal team.

How do upgrades affect the self-hosted routing service?

Every upgrade needs a compatibility check, because the routing service must match the Hyperswitch core, Control Center and client SDKs. Hyperswitch ships roughly monthly minor releases, including v1.126.0 (August 24, 2026), v1.127.0 (September 28, 2026) and v1.128.0 (October 16, 2026), and each has a compatibility matrix on the GitHub releases page. Check dependency changes first. Superposition became required in v1.124.0, so a missing service can block an upgrade. Test each release in staging, keep routing configuration under version control, and schedule rollbacks in advance. Redis and PostgreSQL also need patching: Redis shipped security releases 8.10.2, 8.8.3, 8.6.7, 8.4.7 and 8.2.10 together on September 17, 2026. Confirm your upgrade cadence and who approves it.

How DeployOpen scopes and delivers a self-hosted routing service

DeployOpen plans and implements the routing service inside your own infrastructure, under a fixed-scope engagement with the scope, deliverables and timeline agreed in writing before work starts. The written scope is where the decisions get recorded: which Hyperswitch release and matching Control Center version you run, whether the routing service sits on the same Kubernetes cluster as the Router or on separate infrastructure, which Redis and PostgreSQL arrangements back it, which processors are connected, and which routing strategies are enabled first. DeployOpen does not publish a price list, so a quote follows from that written scope. Ask for the quote to list each deliverable separately, including the Docker configuration, the Hyperswitch connection settings, the validation switch setup, the default fallback order and the production checklist, so you can compare it line by line against what your own team would build.

DeployOpen also covers the parts that surround the service after go-live. Hyperswitch ships roughly monthly minor releases, and the Superposition dependency added in v1.124.0 means a deployment has to be ready for that change before an upgrade. A retainer can cover upgrades, release-by-release compatibility checks and ongoing support for the routing service, which is a recurring cost to budget separately from the one-time build. Ask a prospective partner how a retainer handles a required dependency change in a minor release and who signs off on the compatibility matrix before a rollout.

Security testing of the routing setup is a separate, scoped deliverable. DeployOpen can test the routing service deployment, its exposed endpoints, the credentials it uses to reach Hyperswitch, and the access controls on the Redis and PostgreSQL instances that hold its state, then deliver a findings report with fixes and a retest. DeployOpen does not issue audit reports or certifications for your environment; if a PCI DSS or other assessment depends on the routing setup, your assessor or certification body makes that determination, and the test findings are evidence you can give them. Confirm the testing scope, the retest window and the report format in the written scope before work begins.

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.