Big Iron Bank

The Capstone

A fictional Arizona community bank run on MongoDB the way production has to be run: fast queries you can prove, money that always balances, a cluster that survives failures, backups that restore, and data that only the right people can read.

Two deployments

MongoDB AtlasSelf-managed
ClusterFree M0 for everyday work; an M10 for a few hours for backup labsA 3-member replica set on my own Linux VMs
ResilienceSnapshots and point-in-time restoreFailover drills, oplog sizing, mongodump/mongorestore
SecurityLeast-privilege database users, IP access list, encryption at rest with Google Cloud KMSSCRAM users, custom roles, TLS
Built withPulumi (infrastructure as code), mongosh, Compass, the Atlas CLI

The bank's data

CollectionShapeWhy
customersEmbedded addresses and identity (KYC) documentsRead together, so stored together
accountsOne document per account, referencing its customerUpdated constantly; kept small
transactionsA time-series collectionAppend-heavy, queried by account and date
sessionsTTL indexExpired logins delete themselves

Schema validation rejects malformed documents at the door: no account without a customer, no negative balance, no transaction without an amount.

The DBA work

Indexes

Teller lookups, statements and fraud queries, each proven with explain() as an index scan, with before and after timings.

Transactions

Transfers between accounts in multi-document ACID transactions with retry logic. The day's books reconcile to the cent.

Failover

Kill the primary, watch the election, confirm nothing acknowledged with majority write concern was lost.

Sharding

Transactions sharded on { account_id, date }, with the reasoning written down: why a timestamp alone would be a hot spot.

Restore

Every backup restored and timed. A runbook for each kind of recovery.

Operations

Atlas alerts, the profiler and Performance Advisor, and on-call runbooks for replication lag, full disks and connection storms.

The security layer

Least privilege

Tellers read. Only the batch user writes. Auditors get read-only access plus the audit log.

Network

IP access list, and a written PrivateLink design for production.

Encryption

At rest with a Google Cloud KMS key I control. SSNs encrypted in the client, so even a DBA can't read them.

Evidence

Every control documented the way a HIPAA or SOX auditor would ask for it.

Big Iron Bank: progress

WeekBuildDone whenStatus
1 · Sep 28The bank's data model, validation, indexes, transactionsEvery key bank query is an IXSCAN; transfers balance to the centIn progress
2 · Oct 5Performance, sharding, monitoringA slow query found and fixed; transactions sharded; alerts firingPlanned
3 · Oct 12Replica set, backups, securityFailover drill passes; a restore is timed; SSNs unreadable to the DBAPlanned
4 · Oct 19Runbooks, rebuild from code, certificationRebuilds from scratch with one Pulumi command; MongoDB Associate Atlas AdministratorPlanned
1–4 · by Oct 20Big Iron West: an acquired bank's MySQL core migrated to a MongoDB replica set across five Azure regionsUp to 1 TB moved with zero unexplained differences; failover, upgrade and restore drills; forecast vs actual cost reconciledPlanned
5 · Oct 26Backups and migration staging through S3 (AWS on LocalStack); vector search basicsA backup restored from S3 and timed; first $vectorSearch queryPlanned
6 · Nov 2The huge migration on Google CloudResharding, cutover with a tested rollback, point-in-time restore at scalePlanned
7 · Nov 9A banking RAG assistant on MongoDB Vector Search, live on this siteAnswers from the bank's own documents, filtered by each employee's rolePlanned

Side project, also on MongoDB: Entropa Migrated ✓

Entropa is a live Java (Spring Boot) system that records AI decisions in a tamper-evident hash chain, running on Google Kubernetes Engine. On September 28, 2026 I migrated its audit log from Postgres to MongoDB Atlas, with no lost events:

The write-up, with the evidence: github.com/aimozart/entropa-public

Code, runbooks and evidence: github.com/aimozart. All data is fictional.