Ariya Sarrafzadeh
TEHRAN, IRNOMINAL · <15MS SLA
Available for Architecture Advisory & Audits
Ariya Sarrafzadeh·Systems Architect & Technical Product Leader

Systems that hold under pressure.

I work at the intersection of systems architecture, engineering, and product thinking—designing dependable technology for complex, high-stakes environments.

15+ years engineering high-availability banking switches, sub-30ms ISO 8583 multi-PSP routing, two-phase balance reservation machines with zero financial drift, and national SMPP 3.4 telecom gateways handling 50,000 TPS burst capacity.

[ISO 8583][2PC MUTEX][ACID LEDGERS][SMPP 3.4][SCYLLADB][RABBITMQ CDC][NEO4J][REDIS SETNX]
Interbank Switch: SUB-30MS failover & auto-0400
Ledger Mutex: Zero drift via SETNX & CDC outbox
01 · SETTLEMENTS & LEDGERS
ACID LEDGER

The Double-Entry Ledger & Two-Phase Balance Reservation Engine

Peak Throughput50,000 TPS
Financial Drift0.00% (ZERO)
ARCHITECTURE BLUEPRINT · TOPOLOGY SCHEMATIC2PC VERIFIED
Double-Entry Ledger and Two-Phase Reservation Topology Schematic
Invariants & Business Logic
  • •Single Source of Financial Truth: Strict Σ Debits − Σ Credits = 0 mathematical balance enforcement across ScyllaDB and PostgreSQL ACID fact tables.
  • •Two-Phase Reservation: Transitions capital from AVAILABLE to RESERVED prior to dispatching upstream bank webhooks.
  • •Distributed Idempotency: Redis atomic SETNX mutex locks (15,000ms SETNX) with a 24-hour expiration window (86,400s (24h)).
Failure Modes & Recovery
  • •Upstream Banking Timeouts: Handled via transactional outbox pattern and Raft-backed distributed state recovery, rejecting uncommitted transient states.
  • •Automated Rollback: Expired balance reservations automatically revert to AVAILABLE upon receipt of failure webhooks or TTL expiry.
  • •Production Impact: 100% mathematical parity across 50,000+ daily events with zero duplicate payouts during upstream PSP brownouts.
Product Decision · DigiPay Core Ledger

Why this, why then: Inconsistent ledger states and ghost balances during high-concurrency wallet checkouts threatened regulatory standing.

What I traded off: Enforced strict synchronous two-phase balance reservation over raw optimistic write throughput.

Who pushed back, and how it resolved: Growth stakeholders favored sub-10ms unreserved checkouts. I demonstrated that preventing unbacked overdraws was mandatory for Central Bank audit.

Business result: Maintained 100% mathematical ledger parity across 50,000+ daily events with zero duplicate payouts.

[ACID][2PC RESERVATION][REDIS SETNX][SCYLLADB]
Read the ledger and reservation sections→