Skip to main content
  1. Posts/

Financial-Grade Distributed Transactions vs. Internet Eventual Consistency: The Fundamental Divide in Distributed Systems

Financial-Grade Distributed Transactions vs. Internet Eventual Consistency: The Fundamental Divide in Distributed Systems
#

Core Thesis

Financial-grade distributed transactions and Internet eventual consistency may look like two competing technical approaches.

In reality, they represent two fundamentally different engineering philosophies.

Financial systems process:

money, accounts, transactions, clearing, and settlement.

Internet systems often process:

orders, inventory, content, recommendations, and social state.

Their priorities are therefore different:

Financial Systems
    Correctness First

Internet Systems
    Availability / Latency First

Financial systems are willing to sacrifice some availability, latency, and throughput in exchange for stronger correctness guarantees.

Internet systems are often willing to accept temporary inconsistency in exchange for:

  • high availability
  • low latency
  • massive scale
  • horizontal scalability

The real question is therefore not:

“Which architecture is more advanced?”

It is:

“What kind of inconsistency can the business afford?”


1. What Problem Does a Distributed Transaction Actually Solve?
#

Transactions are relatively straightforward inside one database.

BEGIN

    UPDATE Account A

    UPDATE Account B

COMMIT

A traditional database can use:

  • locks
  • WAL
  • redo logs
  • undo logs
  • transaction isolation

to maintain atomicity.

Distributed systems are much harder.

Consider:

Application A
     |
     +------ Database A
     |
     +------ Service B
                  |
                  +------ Database B

Suppose we transfer:

Account A

-1000

and:

Account B

+1000

Now imagine:

Account A

Debit succeeds

but:

Account B

Credit fails

The system is now inconsistent.

For an e-commerce application, temporary inconsistency may be acceptable.

For a bank account, it can become a financial incident.

Therefore:

Distributed transactions exist to coordinate state changes across multiple systems while preserving business correctness.


2. CAP: The First Theoretical Coordinate System
#

CAP is commonly described as:

C = Consistency
A = Availability
P = Partition Tolerance

A distributed system cannot unconditionally guarantee all three properties simultaneously under network partition.


2.1 Consistency
#

Consistency means that system state satisfies the required consistency model.

A financial system may require:

Node A = 10,000

Node B = 10,000

rather than:

Node A = 10,000

Node B = 9,000

followed by:

“It will synchronize later.”


2.2 Availability
#

Availability means that the system continues serving requests whenever possible.

Internet services often prefer:

Request


Fast Response

rather than:

Request


Wait for distributed consensus


Response

2.3 Partition Tolerance
#

Real networks fail.

Distributed systems must assume:

  • Packet loss
  • Network delay
  • Node failure
  • Network partitions

For example:

Node A
    X
Node B

Therefore, practical distributed systems almost always need partition tolerance.

The key engineering trade-off becomes:

CP

vs.

AP

3. Why Financial and Internet Systems Make Different Choices
#

A simplified comparison:

DimensionFinancial SystemsInternet Systems
Primary GoalCorrectnessAvailability / UX
ConsistencyStrong consistency preferredEventual consistency common
LatencyCan be sacrificedCritical
Error CostExtremely highOften compensable
Failure StrategyBlock / Rollback / CompensateRetry / Queue / Fallback
Typical ModelACID / CP-orientedBASE / AP-oriented

The fundamental philosophy is:

A financial system may prefer temporary unavailability over returning an incorrect balance.

An Internet system may prefer:

Temporary inconsistency over making the entire service unavailable.


4. BASE: The Engineering Philosophy Behind Eventual Consistency
#

BASE is commonly summarized as:

Basically Available
Soft State
Eventually Consistent

The idea is that distributed systems can remain operational while allowing intermediate states.

Instead of:

Everything must complete synchronously

the system behaves more like:

Commit Local State


Publish Event


Retry


Compensate


Eventually Converge

This is fundamentally different from strict ACID-style global transaction coordination.


5. Financial Distributed Transactions: 2PC / XA
#

Two-Phase Commit is one of the classic mechanisms for distributed atomicity.

The architecture is:

                Coordinator

             +-------+-------+
             |       |       |
             v       v       v

             A       B       C

Phase One: Prepare
#

The coordinator asks all participants:

PREPARE

The participants attempt to enter a ready state.

A = READY
B = READY
C = READY

Phase Two: Commit
#

If every participant votes successfully:

Coordinator


COMMIT


A
B
C

All participants commit.


Rollback
#

If any participant fails:

Participant B


FAILED

the coordinator requests:

ROLLBACK


A
B
C

6. Why 2PC Is Reliable but Expensive
#

2PC provides powerful atomicity guarantees.

But it has significant costs.

6.1 Blocking
#

Participants may need to wait between:

PREPARE

and:

COMMIT / ROLLBACK

Resources may remain involved in the transaction until the global decision is known.


6.2 Coordinator Failure
#

If:

Coordinator
      X

participants may enter an uncertain state.

They may not know whether the global transaction should commit or roll back.


6.3 Network Overhead
#

The transaction requires multiple communication phases:

Prepare


Vote


Commit

The result can be:

  • higher latency
  • longer lock duration
  • more network traffic
  • reduced concurrency

7. Why Financial Systems Still Use Strong Transactions
#

Because:

The cost of a financial error can be much larger than the cost of transaction coordination.

Imagine a system processes:

Account A

-10,000

but:

Account B

+0

A bank cannot simply respond:

“The system will eventually converge.”

It needs:

Transaction State
+
Account State
+
Audit Evidence
+
Recovery Procedure

to be explicitly controlled.

This is why financial systems pay what can be called:

The consistency tax.


8. TCC: Business-Aware Distributed Transactions
#

TCC stands for:

Try
Confirm
Cancel

The key difference is:

The business participates directly in transaction coordination.


9. TCC: Try Phase
#

The system reserves the required business resource.

For example:

Available Balance

10,000


Reserve 1,000

The funds may be frozen rather than permanently deducted.


10. TCC: Confirm Phase
#

If all participants succeed:

CONFIRM

the reservation becomes a real business operation:

Frozen 1,000


Final Debit

11. TCC: Cancel Phase
#

If the global transaction fails:

CANCEL

the reserved resource is returned:

Frozen 1,000


Unfreeze


Back to Available Balance

12. TCC vs 2PC
#

2PC mostly delegates transaction coordination to the transaction manager and data stores.

TCC moves more responsibility into the business layer.

Dimension2PCTCC
Transaction controlInfrastructure-drivenBusiness-driven
Database lockingMore prominentCan be reduced
FlexibilityModerateHigh
Business involvementLowerHigh
Code complexityHighVery high
Typical UseTraditional distributed transactionsComplex financial workflows

The trade-off is clear:

TCC can provide more business flexibility, but it increases application complexity.

Every business operation needs meaningful:

Try()
Confirm()
Cancel()

implementations.


13. Why Financial Transaction Code Is So Complex
#

A production-grade financial transaction must handle:

  • Idempotency
  • Retries
  • Timeouts
  • Duplicate messages
  • Partial failures
  • Coordinator recovery
  • Compensation
  • Audit trails
  • State transitions

For example:

Transaction
    |
    +---- TRY
    |
    +---- CONFIRM
    |
    +---- CANCEL
    |
    +---- TIMEOUT
    |
    +---- RETRY
    |
    +---- RECOVERY

This complexity is not accidental.

It is the price of maintaining correctness under distributed failure.


14. Saga: Long Transactions Without Global Locks
#

Saga takes a different approach.

Instead of creating one huge distributed transaction:

T1 → T2 → T3 → T4

each step becomes a local transaction.

If the final step fails:

T4 FAILED


Compensate T3


Compensate T2


Compensate T1

The key idea is:

Use business compensation instead of holding a global transaction open.


15. Why Saga Works for Long Business Processes
#

Consider:

Loan Application


Credit Approval


Account Opening


Contract Signing


Disbursement

It would be impractical to keep a single database transaction open across the entire workflow.

Instead:

Local Commit


Next Step


Local Commit


Next Step

If something fails:

Compensation

is triggered.


16. Compensation Is Not the Same as Rollback
#

This distinction is extremely important.

Database rollback:

ROLLBACK


Restore Previous Transactional State

Business compensation:

Refund

Reverse

Cancel

Release

is a new business operation that changes the state.

For example:

Debit


Failure


Refund

The refund is not technically the same thing as rolling back the original transaction.

That is why compensation logic must be carefully designed.


17. Reliable Messaging: Eventual Consistency With Strong Local Guarantees
#

Not every financial workflow needs global strong consistency.

Peripheral financial applications such as:

  • Rewards
  • Marketing
  • Notifications
  • Non-real-time reconciliation

may use:

Local Transaction
+
Message Queue
+
Retry
+
Compensation

A common architecture:

Business Service


Local DB Transaction


Business Record
+
Message Record


Message Queue


Consumer

The key principle is:

Make the local business state and the intent to send the message atomic.


18. The Local Message Table Pattern
#

Suppose:

BEGIN

INSERT Order

INSERT Outbox Message

COMMIT

The business state and message intent are committed together.

A background process then:

Scan Outbox


Publish to MQ


Wait for Confirmation


Mark Message Complete

If the MQ is temporarily unavailable:

Retry

The message remains durable in the local database.

This pattern is extremely useful for:

  • Financial notifications
  • Reconciliation workflows
  • Customer-facing updates
  • Non-core asynchronous processes

19. Internet Eventual Consistency: MQ-Based Asynchronous Processing
#

The classic Internet pattern is:

User


Order Service


Create Order


Message Queue


Inventory Service

The order service does not need to wait for inventory processing to complete.

Therefore:

Order Created

may happen before:

Inventory Updated

There is a temporary inconsistency window.

But eventually:

Message Delivered


Inventory Updated


System Converges

20. Why E-Commerce Can Accept This Model
#

Many e-commerce inconsistencies are compensable.

For example:

Order Created

but later:

Inventory Unavailable

The system can:

  • Cancel the order
  • Refund the customer
  • Restore inventory
  • Offer an alternative product

This is fundamentally different from:

Bank Account
-1000

Recipient Account
+0

A financial asset cannot always be repaired through a simple user-facing compensation.


21. Event Sourcing: Store the History, Not Only the State
#

Another approach is:

Do not only store the current state.

Store the complete sequence of events.

Event 1
Event 2
Event 3
Event 4
...

Then:

Replay Events


Reconstruct Current State

Example:

Starting Balance
1000


-100


+500


-200

=

1200

This provides:

  • Auditability
  • Replayability
  • Traceability
  • State reconstruction

It is especially useful for:

  • Financial ledgers
  • Trading records
  • Audit systems
  • Event-driven architecture

22. Financial Strong Consistency vs Internet Eventual Consistency
#

DimensionFinancial-Grade TransactionsInternet Eventual Consistency
TheoryACID / CP-orientedBASE / AP-oriented
ConsistencyStrongEventual
Inconsistency WindowMinimizedExpected
Main Mechanisms2PC / TCC / SagaMQ / Retry / Compensation
Main ObjectiveFinancial correctnessAvailability and throughput

23. Performance Comparison
#

DimensionStrong TransactionEventual Consistency
Per-request LatencyHigherLower
Network Round TripsMoreFewer
LockingMore likelyLess
ThroughputLower under contentionHigher
Horizontal ScalingMore difficultEasier
Failure RecoveryTransaction recoveryRetry / Compensation

The important point is not:

“Strong consistency is slow.”

The better statement is:

Strong consistency introduces coordination costs.

Those costs become larger as:

  • the number of participants increases
  • network distance increases
  • contention increases
  • transaction duration increases

24. Strong Consistency Is Not Always Slow
#

A highly optimized system can still provide strong consistency at significant scale.

Performance depends on:

Consistency Requirements

+

Transaction Scope

+

Participant Count

+

Network Topology

+

Database Architecture

+

Hardware

Therefore:

The performance problem is not consistency itself, but the cost of coordinating consistency across distributed state.


25. Availability and Failure Recovery
#

Financial Core
#

When a critical component fails:

Transaction Coordinator
        X

the system may prefer:

Pause Critical Transactions


Preserve Correctness

This is:

Safety first.


Internet Platform
#

If a downstream service fails:

Inventory Service
        X

the system may choose:

Retry


Circuit Breaker


Queue


Fallback

while the rest of the platform remains operational.

This is:

Availability first.


26. Business Intrusiveness
#

DimensionTCC / Strong TransactionsMQ / Eventual Consistency
Code ComplexityHighMedium
Business CouplingHighLower
IdempotencyCriticalCritical
CompensationComplexCommon
TestingVery difficultDifficult
Failure CasesManyMany

Eventual consistency is therefore not “free.”

Large Internet companies must still solve:

  • Duplicate messages
  • Out-of-order events
  • Message storms
  • Dead letters
  • Consumer lag
  • Retry loops
  • Compensation failures

The difference is where the complexity lives.


27. Auditability: Another Fundamental Difference
#

Financial systems typically require:

Every Financial State Change


Traceable Origin


Verifiable Process


Reproducible Result

Therefore they need:

  • transaction state
  • immutable records
  • audit logs
  • business events
  • recovery information

Internet applications also require observability, but often primarily for:

  • debugging
  • analytics
  • service monitoring
  • user behavior

In financial systems:

Auditability is part of correctness.


28. Case Study: Why Payment Systems Need Strong Transaction Guarantees
#

A simplified payment architecture:

                     Payment Request
                            |
                            v
                       Risk Check
                            |
                            v
                    Global Transaction
                            |
             +--------------+--------------+
             |              |              |
             v              v              v
         Buyer Account   Seller Account   Ledger
             |              |              |
             +--------------+--------------+
                            |
                            v
                    Confirm / Cancel

The essential rule is:

All Succeed

OR

All Fail

The system must avoid:

Buyer = -1000

Seller = 0

That is the core reason financial systems place such strong emphasis on distributed transaction coordination.


29. Case Study: Why E-Commerce Orders Prefer Eventual Consistency
#

A common order flow:

User
Order Service
Create Order
Message Queue
Inventory Service
Cache / Database
Payment
Shipping

These subsystems can process asynchronously.

The order service does not need to wait for:

  • inventory
  • payment
  • logistics
  • notification

to finish synchronously.

That dramatically improves:

  • response latency
  • throughput
  • resilience
  • scaling

30. The Real Selection Rule: Business Semantics Decide
#

The common misconception is:

Finance = Strong Consistency
Internet = Eventual Consistency

The more accurate rule is:

Financial Asset / Money
Strong Consistency Priority

Information / Experience
Eventual Consistency Often Acceptable

The company itself is not the decisive factor.

The business domain is.


31. Internet Companies Entering Finance
#

When an Internet company enters:

  • Payments
  • Banking
  • Lending
  • Stored value
  • Securities
  • Financial accounts

it inherits financial constraints.

That means:

Internet Company

      |

      +---- Social / Content
      |          ↓
      |      Eventual Consistency
      |
      +---- Payment / Account
         Strong Financial Controls

The architecture changes because the business risk changes.


32. NewSQL: The Attempt to Bridge the Two Worlds
#

Traditional relational databases:

Oracle / MySQL

Strong Transaction Semantics
+
Mature Ecosystem

but historically harder to scale horizontally

Distributed NoSQL systems:

Distributed
+
Highly Scalable

with more flexible consistency models

NewSQL attempts to combine:

SQL

+

Distributed Storage

+

Transactions

+

Horizontal Scalability

Examples include:

  • OceanBase
  • TiDB
  • Google Spanner

33. OceanBase: Financial-Grade Distributed Database Direction
#

OceanBase represents a strong consistency-oriented distributed database approach.

Its architecture incorporates concepts such as:

  • Multi-replica data
  • Consensus-based replication
  • Distributed transactions
  • Horizontal scalability

The key proposition is:

Move more distributed consistency machinery into the database layer.

That can simplify application architecture.

Instead of:

Application
+
Custom Transaction Coordinator
+
Custom Recovery

developers can rely more heavily on:

Distributed Database

to provide transactional guarantees.


34. TiDB: Distributed SQL and Transactional Infrastructure
#

TiDB follows another branch of the distributed SQL ecosystem.

It combines:

  • SQL compatibility
  • Distributed storage
  • Distributed transactions
  • Horizontal scaling
  • HTAP-oriented capabilities
  • Cloud-native deployment

The architectural goal is similar:

Make distributed database complexity less visible to application developers.


35. Why NewSQL Does Not Automatically Replace Financial Core Systems
#

A distributed database can provide:

Distributed Transactions

but a financial core still needs:

Database

+

Transaction State Machine

+

Business Rules

+

Idempotency

+

Compensation

+

Audit

+

Regulatory Controls

The database is only one layer.

Therefore:

NewSQL can modernize the data layer without automatically replacing the entire financial transaction architecture.


36. The Future: NewSQL + Business Transactions + AI
#

A likely future stack is:

Legacy Financial Core


Distributed Financial Database


Standardized Transaction Layer


TCC / Saga / Business Compensation


AI-Assisted Orchestration

AI agents may become intelligent orchestration layers.

For example:

AI Agent


Analyze Business State


Risk Service


Account Service


Payment Service


Compensation

But there is one critical rule:

AI can help decide. Deterministic transaction systems must control financial state.


37. Why an AI Model Should Not Directly Modify Account Balances
#

A naive architecture would be:

LLM


UPDATE account_balance

A production financial architecture should instead look more like:

              AI / Agent
                   |
                   v
             Policy Engine
                   |
                   v
              Risk Engine
                   |
                   v
        Transaction Orchestrator
                   |
                   v
         Strongly Consistent Core
                   |
                   v
                Database

The architectural division is:

AI provides intelligence.

The transaction system provides correctness.

This distinction will become increasingly important as AI agents enter financial workflows.


38. Recommended Consistency Model by Business Scenario#

Business ScenarioPreferred PatternConsistency PriorityReason
Bank transfer2PC / TCCStrongMoney cannot be inconsistent
Core paymentTCC / dedicated transaction frameworkStrongAsset integrity
Securities core tradingStrong transaction + compensationStrongAccount and trade state
Clearing / settlementStrong transactionStrongAmounts must reconcile
RewardsMQ + eventual consistencyEventualNon-core asset
E-commerce orderMQ + outboxEventualHigh throughput
InventoryMQ + cache + DBEventual often acceptableCompensatable
Social likesAsync counterEventualDelay is acceptable
RecommendationCache + async computationEventualExperience-focused
Risk controlReal-time computation + strong controlsScenario dependentError cost can be high

39. The Three Layers of the Divide
#

The fundamental divide exists at three levels.

Theoretical Layer
#

CAP:

Financial Systems
CP-oriented

Internet Systems
AP-oriented in many workloads

Engineering Layer
#

Financial:

2PC
TCC
Saga
Idempotency
Compensation
Transaction State

Internet:

MQ
Retry
Dead Letter
Event Sourcing
Compensation

Business Layer
#

The deepest difference is:

Financial Loss


Information Inconsistency

That difference determines everything else.


40. The Most Important Architecture Rule
#

Do not ask:

“Is 2PC better than eventual consistency?”

Ask:

“Can this business tolerate temporary inconsistency?”

If the answer is:

No

use stronger transaction semantics.

If:

Yes

use:

Asynchronous Processing
+
Retry
+
Compensation

If the workflow is long-running:

Saga

If there is an explicit resource reservation model:

TCC

If the requirement is reliable asynchronous propagation:

Outbox + Message Queue

This is a much better approach to distributed transaction design than choosing technologies by popularity.


41. The Future Architecture Map
#

                  AI Agent
                      |
                      v
             Intelligent Orchestration
                      |
             +--------+--------+
             |                 |
             v                 v
       Strong Transactions   Async Flows
             |                 |
             v                 v
       Financial Core      Digital / Internet
             |                 |
             +--------+--------+
                      |
                      v
              Distributed Data
                      |
                      v
                 Cloud Native

The future will likely not eliminate the distinction between strong and eventual consistency.

Instead:

AI and distributed platforms will make it easier to combine both models within one larger architecture.


42. Conclusion: The Divide Is Business, Not Technology
#

Why are financial-grade distributed transactions and Internet eventual consistency so different?

Not because:

  • Financial engineers are better
  • Internet engineers care less about correctness
  • One architecture is modern
  • The other is legacy

The real reason is:

The cost of being wrong is different.

Financial systems process:

Money
Accounts
Clearing
Settlement
Transactions

Errors can be irreversible.

Internet systems often process:

Orders
Inventory
Content
Recommendations
Social State

Errors can frequently be repaired.

Therefore:

Financial Systems

Correctness First


2PC / TCC / Saga / Strong Transactions

while:

Internet Systems

Availability First


MQ / Retry / Compensation / Eventual Consistency

43. Three Principles to Remember
#

Principle One: CAP Is a Trade-Off, Not a Product Feature
#

There is no universally “best” consistency model.


Principle Two: Compensation Is a Business Capability
#

Rollback is a database operation.

Compensation is a business operation.

They are not the same thing.


Principle Three: AI Does Not Eliminate Transaction Semantics
#

An intelligent agent may make a better decision.

It does not change the fact that:

Money must still be recorded correctly.


Appendix: Distributed Transaction Technology Map
#

                    Distributed Transactions
                              |
          +-------------------+-------------------+
          |                   |                   |
          v                   v                   v
         2PC                 TCC                Saga
          |                   |                   |
       Global             Business            Compensation
      Coordination          Driven               Driven
          |                   |                   |
          +-------------------+-------------------+
                              |
                              v
                   Reliable Messaging
                              |
                              v
                  Eventual Consistency
                              |
                              v
                     High Availability

A modern hybrid architecture may therefore look like:

                     AI Agent
                        |
                        v
               Intelligent Workflow
                        |
          +-------------+-------------+
          |                           |
          v                           v
   Strong Transaction            Async Workflow
          |                           |
          v                           v
   Financial Core             Internet / Digital
          |                           |
          +-------------+-------------+
                        |
                        v
                 Distributed Data
                        |
                        v
                   Cloud Native

Author Note

Distributed-systems architecture should never become a matter of ideology.

2PC is not automatically outdated.

Eventual consistency is not automatically more advanced.

TCC is not automatically better than Saga.

The correct architecture is the one whose failure model matches the business.

If a bank account is wrong, the system has failed.

If a recommendation is a few seconds stale, the system may still be perfectly healthy.

The most important architectural boundary is therefore not between old and new technology.

It is between:

errors that can be repaired

and:

errors that must never happen.

That is why financial-grade distributed transactions and Internet eventual consistency will continue to coexist.

The boundary is not fundamentally technological.

It is the boundary of business risk.

Related