Skip to content
UPI • High-Scale Switch Engineering 12 min read • 23 October 2026

UPI Switch Active-Active Multi-Region Architecture: Achieving 100,000 TPS & Sub-20ms P99 Latency

How Indian fintech payment switches architect dual-region active-active clusters across Mumbai and Hyderabad — achieving sub-20ms P99 latency, zero-RPO database consensus on distributed SQL, dynamic traffic shifting, and seamless DR failovers.

UPI Switch Active-Active Multi-Region Architecture Whiteboard Diagram
Read Article In / भाषा चुनें:

1. The Limits of Active-Passive Disaster Recovery in UPI

In traditional banking architecture, institutions rely on an Active-Passive disaster recovery (DR) setup: Region A handles 100% of the live load while Region B sits idle in warm standby. During sudden datacenter blackouts or fiber cuts, spinning up the secondary site takes between 15 to 45 minutes — resulting in millions of dropped payments and regulatory fines from NPCI.

Processing 100,000 transactions per second (TPS) during festival surges requires a true Active-Active Multi-Region deployment where both Mumbai (DC) and Hyderabad (DR) concurrently process financial transactions with zero data loss (RPO = 0) and instantaneous failover (RTO < 1s).

2. Dual-Region Topology & Consensus Mechanics

As visualized in our hand-drawn technical whiteboard blueprint above, an active-active switch consists of four synchronized architectural tiers:

  1. Anycast BGP & Cloudflare Geo-Routing: Routes incoming mobile payment payloads to the topologically closest datacenter with sub-5ms network transit.
  2. Stateless Rust/Go Switch Microservices: High-concurrency switch workers process XML/JSON ISO 8583 message parsing without persisting session state in local memory.
  3. Distributed SQL Cluster (Raft/Paxos Consensus): Spans across Mumbai, Hyderabad, and an independent witness zone (Bangalore) to guarantee transactional consistency without two-phase commit locks.
  4. Redis Enterprise Multi-Master Replication: Synchronizes idempotency keys, merchant rate limits, and risk velocity counters in < 8ms across regions.

3. Handling Cross-Region Write Conflicts

Because payment balances cannot tolerate split-brain states, the switch implements account-based sharding and single-writer leaseholders:

// Sharded transaction lock pattern with leaseholder pinning
async function executeActiveActiveUPI(txnPayload) {
  const payerHash = hashVpa(txnPayload.payerVpa);
  const preferredRegion = (payerHash % 2 === 0) ? 'MUMBAI_ZONE' : 'HYDERABAD_ZONE';
  
  // Verify local Redis idempotency key with cross-region replication
  const isDuplicate = await redisCluster.set(`IDEMP_${txnPayload.clientTxnId}`, 'PROCESSING', {
    NX: true,
    EX: 45
  });
  if (!isDuplicate) throw new DuplicateTransactionError("Transaction already in flight");

  // Route ledger update to local Raft consensus group
  const ledgerResult = await distributedSql.transaction(async (tx) => {
    return await tx.executeLedgerHold(txnPayload);
  });

  return ledgerResult;
}

4. Zero-Downtime DR Drills: Chaos Engineering

NPCI mandates regular unannounced DR switchover drills. An active-active switch achieves continuous verification by conducting "Blackhole Simulations":

  • Synthetic Traffic Bleed: Progressively shift 10% to 100% of Mumbai traffic to Hyderabad within 30 seconds using weighted DNS SRV records.
  • Automated Circuit Breakers: If cross-region inter-DC latency exceeds 35ms, the system decouples analytics telemetry and falls back to local async sync queues.
  • Bank Simulator Health Probes: Synthetic health pings constantly test issuer bank CBS adapters to detect bank downtime before real user transactions fail.

5. Architecture Metrics: Active-Passive vs. Active-Active

Capability Legacy Active-Passive DR Active-Active Multi-Region
Recovery Time Objective (RTO) 15 – 45 minutes < 1 second (Zero drop)
Recovery Point Objective (RPO) 5 – 30 seconds (Data lost in transit) 0 (Strict Serializable Raft)
P99 System Latency 85 – 140ms < 18ms
Hardware Utilization 50% (Standby capacity wasted) 100% (Both DCs actively process load)