Upgrade Seller Voucher Deactivation on Regulatory Penalty
Redesigned penalty-triggered voucher deactivation by evaluating methods across multiple services to fix operator-side/customer-side discrepancies without hurting latency.
- Role
- Backend Engineer
- Timeline
- 2025
- Team
- 2
- Domain
- E-Commerce / Promotion
- Stack
- 5 tech
- Status
- Live
Overview
The Upgrade Seller Voucher Deactivation on Regulatory Penalty project reworked a critical voucher deactivation method triggered by a regulatory penalty. I owned the analysis and improvement end-to-end, targeting data consistency and voucher-state safety across systems while keeping latency in check.
Gallery
A backend has no screens, so its "UI" is the operational surface: the deactivation RPC, self-test scenarios, and the method evaluation report.
Problem & Solution
The existing deactivation flow produced operator-side and customer-side data discrepancies and voucher-state risks, particularly under large-scale processing. Multiple deactivation methods existed across different services, each with different correctness, performance, and compatibility characteristics, making a naive choice risky.
I ran a deep technical assessment to pinpoint inconsistency points in the penalty-triggered deactivation flow, then produced a detailed technical design evaluating alternative methods across multiple services and balancing correctness with latency impact. I aligned the design with the reviewer, paid close attention to data-handling efficiency at scale, and prepared comprehensive self-test documentation covering edge cases and multiple scenarios.
Workflow
Three actors interact with the service; the diagrams are written in English to stay consistent across both languages.
Architecture
A regulatory-penalty event flows into the voucher deactivation service (Go / RPC), which selects the appropriate deactivation method and dispatches to the target service before updating state in a managed RDS (relational database). The design keeps operator-side and customer-side state aligned and evaluates each service path on compatibility, performance, and maintainability.
Features
- Cross-service deactivation method evaluation
- Operator-side / customer-side discrepancy assessment
- Refined deactivation approach
- Latency & scale considerations
- Self-test with edge cases
- Promocode compatibility check
Tech Stack
Engineering Challenges
The existing deactivation method caused inconsistencies between operator-side and customer-side state and voucher-state risks, especially under large-scale processing. Fix: a refined approach ensuring accuracy and cross-system alignment during deactivation.
Several deactivation methods existed across different services with different trade-offs. Fix: a detailed technical design comparing methods on correctness, performance, and maintainability, aligned with the reviewer before implementation.
During self-testing I found one method did not support promocode deactivation. Fix: a timely redesign to a compatible method, preventing a potential production issue.
Outcomes
Lessons Learned
Analyzing and comparing multiple deactivation methods early let me reduce unnecessary changes during implementation and stay aligned with the original design. Comprehensive self-test documentation proved its worth: it surfaced a promocode incompatibility that prompted a reassessment and the selection of a more compatible method before release.
Related Santekno Tutorials
Interested in working together?
Order, payment, or high-traffic event pipelines — let's talk architecture and trade-offs.