Why financial backends are hard

Building a financial backend means solving some of the hardest problems in distributed systems while meeting strict compliance requirements.

Every transaction must be correct

There can be no lost writes or double-counting. A single error can mean regulatory violations or lost money.

Complete audit trail

Regulators require a full, ordered record of every event. Retrofitting audit logging onto an existing system is fragile and error-prone.

Cross-service consistency

A transfer touches balances, ledgers, and limits simultaneously. Coordinating these across services with sagas or two-phase commit adds enormous complexity.

Replayability and recovery

When errors are found, you need to reconstruct exactly what happened and recompute derived state from the ground truth.

Bank transfers at scale

Cross-partition ACID transactions with exactly-once guarantees. Fault-tolerant fund transfers in 50 lines of code, scaling linearly across nodes.

Cluster sizeTransfers/sec?Initiation (p50)?Initiation (p99)?Completion (p50)?Completion (p99)?
2 nodes34,7002ms23ms125ms220ms
4 nodes66,1002ms26ms130ms220ms
8 nodes126,0004ms31ms150ms300ms
16 nodes243,8004ms41ms240ms490ms
32 nodes460,2005ms45ms350ms720ms

Tested on AWS i8g.xlarge instances (4 vCPU, 32GB RAM)

Each transfer debits one account and credits another with full ACID guarantees across partitions. The complete implementation is 50 lines of code.

View the code

RUN THE BANK TRANSFER EXAMPLE LOCALLY

rama-demo-gallery contains BankTransferModule, the exact code behind the benchmarks above, along with many other self-contained examples of building applications with Rama.

git clone https://github.com/redplanetlabs/rama-demo-gallery.gitcd rama-demo-gallerymvn test -Dtest=BankTransferModuleTest

RAMA IN FIVE MINUTES

See how Rama integrates databases, caches, queues, and processing into a single system where you only write business logic. This post walks through an example showing how a traditional Postgres-based architecture accumulates complexity while Rama keeps everything simple.

Stay up to date

Get updates on Rama features, benchmarks, and case studies delivered to your inbox.

Join our Discord

Join the Rama Discord community to ask questions and connect with other developers

Join Discord
planet
planet
Free consultation