What we learned about event sourcing and DDD while building a bank
summary
Lunar builds its banking core in Go on Postgres and runs ~300 services in Kubernetes, serving more than 600k customers. Event sourcing is the persistence model; long account streams grow to ~0.5M events, causing slow loads until snapshot every 100 events cuts tail latencies dramatically. The account stream accumulates 78 event types from model mistakes, so on‑the‑fly event versioning is required. Outbox-based subscriptions move from row‑locks to partitioned reconciler with consistent hashing; transfers move out to a separate stream and use sagas for orchestration.
AI-written summary · about
