Skip to content
Zero-Downtime Voucher Library Migration: Dual-Track Verification & Mirror Rollback
Industry Insights 18 min read

Zero-Downtime Voucher Library Migration: Dual-Track Verification & Mirror Rollback

This article details a zero-downtime migration approach for electronic voucher libraries in fiscal payments, employing dual-track parallel operation, message dual-sending, a structured switch order, and mirror rollback sequences across three phases—parallel verification, early verification, and final switch—allowing rollback at any stage.

BanTech Think Tank
BanTech Think Tank
BanTech Think Tank

Challenges in System Replacement

In fiscal fund payment and non-tax revenue collection, agent banks exchange electronically signed voucher messages with the Ministry of Finance and the People's Bank of China through electronic voucher libraries. The business system generates voucher messages, which are signed and verified by the local voucher library, then sent via message queues to the counterparty library for verification, storage, and receipt confirmation. The voucher system's technical foundation consists of three elements: the cryptographic suite for signing and verification, the message format, and the attached electronic seal. Any inconsistency in these three elements with the counterparty's system causes message rejection.

With rising compliance requirements for cryptographic applications and the evolution of voucher library technology, the counterparty initiated a system replacement. The new-generation voucher library requires national cryptographic certificates and seals, message format changes from old to new, and updates to message channels and interface specifications. For the agent bank, the old and new systems are incompatible across all three elements. Fiscal payment and non-tax collection demand high timeliness and continuity; the replacement must not interrupt business.

The article identifies five key challenges:

Single-system architecture forces "stop old, start new". Existing voucher libraries run on a single system; there is no dual-track mechanism to connect both systems simultaneously. Cutover requires a complete replacement, interrupting message generation, signing, receipt, and accounting during the switch window, creating business risk.

Lack of early validation with real production messages. Test environment simulations cannot cover all real business message shapes, timing, and exception paths. Directly switching production messages to the new system lacks a traffic diversion mechanism that leaves the counterparty untouched and allows quick rollback; any anomaly in the new system under real production messages becomes a production incident.

Three incompatible elements lack coordinated assembly. Cryptographic suite, message format, and electronic seal are managed by separate facilities (cryptographic service configuration, database template fields, management console seal binding) that operate independently without linkage constraints. Any mismatch with the counterparty's current system causes message rejection, and such mismatches are hard to detect beforehand.

Switch actions scattered across multiple configuration points, sequence dependent on manual experience, not rehearsable. A single system switch involves coordinated changes to routing, message format, certificates, seals, channel mapping, standby library start/stop, etc. Current practice uses manual checklists; any missed or misordered step causes element inconsistency. The switch sequence is not structurally recorded, so it cannot be pre-validated.

Rollback path not pre-registered, rollback slow and prone to secondary interruption. Rolling back after discovering issues in the new system requires redeployment or multi-point configuration changes, taking a long time. If the three elements are not restored in the correct order during rollback, mixed old/new messages appear, which the counterparty still rejects, causing a second interruption.

Method and Implementation

To address these challenges, the article designs a technical system of "dual-track parallel, track-change verification, static sequence switching, mirror rollback," with overall architecture as shown in Figure 1.

Figure 1: Overall architecture diagram
Figure 1: Overall architecture diagram

1. Dual-Track Parallel Operation with Message Dual-Sending

The business system generates a production message and a duplicate message for each voucher transaction, both carrying the same business elements but with different identity markers. A routing switch module, driven by configuration center entries, sends the production message to the old-system voucher library (primary library) and the duplicate message to the new-system voucher library (standby library). The two libraries independently perform signing and verification using international and national cryptographic suites respectively, then transmit via independent queue channels to the counterparty's corresponding systems. The same signing/verification facility separates cryptographic suite configuration per library; changing configuration and restarting switches between the two cryptographic systems without mutual interference. A consistency check module aggregates receipt status, voucher elements, and verification conclusions from both libraries for the same transaction, compares them item by item, and logs differences. If the difference rate stays below a preset threshold over several consecutive trading days, parallel verification is deemed passed.

2. Production Message Rerouting for Early Verification

After parallel verification passes, only the configuration center routing entry is modified to reroute production messages to the new-system voucher library, which sends them via its dedicated queue channel to the counterparty's second-generation system at its fixed address and port. Conversely, duplicate messages are routed back through the old-system library to the counterparty's first-generation system, preserving comparison capability with the old system (as shown in Figure 2). The counterparty's old and new systems keep their address and port unchanged during the parallel period; the local rerouting requires no changes to the counterparty's addresses, ports, or configuration. The new system thus undergoes full-link verification—message generation, format assembly, signing/verification, channel transmission, receipt processing—under real production message shapes. During the observation period, any receipt anomaly triggers immediate rollback via the mirror sequence: first restore message format configuration, then reroute back to the old-system library, all without business interruption.

Figure 2: Early verification message rerouting flow
Figure 2: Early verification message rerouting flow

3. Dual-Point Linkage of Message Format

Message format is determined by two configuration points: the old-format marker in the configuration center and the format template field in the database. These two points are bound and executed as a pair. When switching to the new system, the old-format marker is removed and the format template is changed from old to new; rollback reverses this. Adjusting only the marker without synchronously updating the template, or vice versa, causes inconsistency between the actual message format and the link processing method, leading to message rejection by the counterparty.

4. Switch Order and Static Sequence Orchestration

The article consolidates the seven categories of configuration points involved in a system switch—routing entries, old-format marker, format template, cryptographic suite configuration, seal binding, channel mapping, standby library and conversion service start/stop—into a "switch order." This list is structurally registered before execution, with each item containing forward action, mirror rollback action, and sequence constraints. The final switch follows a forward static sequence of "prepare new configuration first, retire old carrier last": first switch cryptographic suite and seal, then adjust channel mapping and routing, complete message format dual-point linkage, finally stop the standby library. If the standby library were stopped before configuration changes, a failed change would leave both libraries unable to produce messages under the new system, creating an unrecoverable window. Static sequence execution uses a step-by-step, freeze-on-failure strategy; execution progress is logged per step, allowing rollback to resume from the most recently completed step without restarting from the beginning.

5. Mirror Rollback Sequence Throughout

A rollback sequence, mirroring the forward static sequence item by item and following "restore carrier first, then restore configuration," is pre-registered alongside the switch plan and can be validated through rehearsal. Rollback starts by activating the standby library to restore old-system carrier capability, then sequentially restores cryptographic suite, seal, message format, and routing channel configuration, avoiding mixed old/new messages during restoration. The entire rollback process maintains business continuity and reduces dependence on operator experience.

Core Innovations

From "stop old, start new" to "dual-track parallel". A single business system simultaneously connects to both old and new voucher library systems; parallel verification, early verification, and final switch phases all run without downtime.

From "simulated message verification" to "real message verification". Using production message rerouting combined with reverse duplicate message carriage, the new system achieves full-link verification under real production message shapes without any counterparty modification; verification results directly support the switch decision.

From "independent configuration point adjustments" to "message format dual-point linkage binding". Message format is jointly determined by the configuration center's format marker and the database's format template field; they are bound as a paired action executed in sequence, preventing inconsistency caused by adjusting only one.

From "manual multi-point operations" to "switch order static sequence orchestration". Distributed multi-point changes converge into a set of registered items with sequence constraints; constraints are inherent to the switch order, not reliant on personal experience, making the process controllable, rehearsable, and resumable after failure.

From "emergency fix rollback" to "mirror rollback sequence". The rollback sequence mirrors the forward sequence, is pre-registered, follows "restore carrier first, then restore configuration," completes in minutes, and maintains business continuity.

Application Results and Promotion Value

The solution has been implemented in the agent bank's participation in the People's Bank of China's new-generation electronic voucher library system replacement project.

Implementation results show: Parallel verification ran continuously with receipt consistency checks; differences were traceable to specific voucher types and message links, providing accurate input for fixes. During early verification, production messages passed full-link signing, transmission, and receipt accounting in the new system. A receipt anomaly occurred but was successfully rolled back via the mirror sequence without business interruption; after fixes, re-verification passed stably. Final switch completed within the window following the static sequence; production messages passed national cryptographic verification, with no rejections due to format, cryptographic suite, or seal inconsistencies. Post-switch rollback rehearsal confirmed minute-level rollback availability.

Promotion value: The solution's core mechanisms—message dual-sending, switch order, mirror rollback sequence—are decoupled from specific product forms. With adaptive adjustments to the three-element checklist and sequence constraints, the approach can be reused for cryptographic application transformation (international to national algorithms), message format system upgrades, payment clearing channel generational replacements, and other "multi-element linkage, no interruption allowed" system switch scenarios, providing a reusable methodological reference for similar projects.

Future Outlook

Under the domestic technology substitution framework, electronic voucher library system replacement is a concrete practice of national cryptographic algorithm implementation in fiscal and financial infrastructure, involving four interconnected dimensions: security assurance, autonomous controllability, mutual promotion, and policy support. The transformation at the voucher message level involves not only cryptographic algorithms but also cryptographic suite, message format, and electronic seal; any non-compliant element causes message rejection, requiring overall compliance and controllability of key elements. Next steps include continuously improving process automation for early anomaly warning, extending this technical framework to more business scenarios, accumulating configuration assets, reducing iteration costs, achieving smooth and orderly system evolution, and ensuring safe and efficient operation of fiscal fund payments.

Original Source

Signed-in readers can open the original source through BestHub's protected redirect.

Sign in to view source
Republication Notice

This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactadmin@besthub.devand we will review it promptly.

system migrationzero-downtime migrationfinancial infrastructurecryptographic migrationdual-track verificationelectronic voucher librarymessage format upgrademirror rollback
Reader feedback

How this landed with the community

Sign in to like

Rate this article

Was this worth your time?

Sign in to rate
Discussion

0 Comments

Thoughtful readers leave field notes, pushback, and hard-won operational detail here.