
Invariant-Driven Architecture: 20M transactions on a β¬80/mo Cloud VM.
<blockquote> <p>π This is Part 2. <strong><a href="https://dev.to/hugo_vantighem/postgres-grade-serializable-at-20k-opss-on-a-laptop-dont-try-this-at-home-f27">Part 1 β Postgres-grade serializable at 20k ops/s on a laptop (don't try this at home)</a></strong> pre
Hugo Vantighem Posted on May 25 • Originally published at Medium Invariant-Driven Architecture: 20M transactions on a β¬80/mo Cloud VM. # database # performance # go # cloud π This is Part 2. Part 1 β Postgres-grade serializable at 20k ops/s on a laptop (don't try this at home) presented 20,000+ durable, invariant-validated transactions per second β on a MacBook Air M3, 8 cores, fan barely audible. A laptop number is only half the story. The natural next test is whether the same architecture holds on a small, cheap public VM with network-attached storage and strict fsync(2) durability β three constraints that each, on its own, tend to move the bottleneck by an order of magnitude on most stacks. So that's what I ran. The Setup VM: Scaleway POP2-2C-8G β 2 vCPUs AMD EPYC 7543 @ 2.8 GHz, 8 GiB RAM. Yes β two vCPUs. Disk: SBS Block storage, 100 GB, 15,000 provisioned IOPS. Network-attached, not local NVMe. OS: Ubuntu 22.04, kernel 5.15. Linux strict fsync(2) β every commit hits the SSD for real, no Apple-style controller-cache shortcut. Software: the exact same codebase that ran on the M3, with NATS + Mongo + Mongo Express as the side stack in Docker. Price: ~β¬80/month order-of-magnitude β ~β¬54 of compute (POP2-2C-8G at β¬0.0735/h) plus ~β¬20β25 of SBS volume with provisioned IOPS. Hourly that's β¬0.11. Two names, one stack Two terms surface across this series. They sit at different layers, so it's worth pinning them now. Invariant-Driven Architecture (IDA) β the design philosophy . The system, end to end (ingress, sequencer, system, storage), is engineered around a single obsession: validating and enforcing business invariants on every commit, with no compromise on throughput. It's a DDD-based philosophy. Atomic State Platform β the concrete implementation . The software we're benchmarking right here β that just put down 33,091 sustained items per second on a β¬80/mo Scaleway VM. IDA is how . Atomic State is what . The β¬80/mo VM is where . The rest of this post is how
π°Originally published at dev.to
Staff Writer