
Nubank
From Clojure microservices to Spark analytics: the data foundations behind digital banking.
Numbers that matter
The stack
The architecture as an interactive dashboard
The idea is simple: learn by reading the diagram. Every box and arrow tells part of the story — click to open.
Color signals the role: client, streaming, storage, compute, ML, serving. Click any box to see what it is, why it's used, and what happens there.
OptionalRead the full written deep diveThe same ideas as the diagram, with more context — recommended after exploring the steps.
Canonical tools reduce accidental complexity
Nubank's 2020 article The value of canonicity names Clojure for production services, Kafka for asynchronous communication, Datomic for high-value business data, and Scala for analytics.
The lesson is organizational as much as technical: shared tools make practices and expertise reusable across teams, without forbidding a different technology when a problem truly needs it.
Datomic, Clojure, and the Cognitect acquisition
Nubank acquired Cognitect, the company behind Clojure and Datomic, in July 2020. Cognitect's announcement reported 600 Clojure developers, 500 microservices and more than 2,000 Datomic servers at Nubank — figures dated to that moment.
Datomic preserves history instead of overwriting the past, which helps reason about changing financial facts.
The batch platform: S3, Scala and Spark
Nubank's 2024 Scala/Spark article describes three stages:
- Daily extraction from microservices and external sources into Amazon S3.
- Transformation through a repository of dataset queries in Scala and Spark.
- Publication to S3 and Google Cloud, accessed through tools including Databricks and BigQuery.
It reports more than 60,000 datasets and over a thousand monthly contributors. At that scale, dependencies between transformations and consistent definitions matter as much as distributed execution.
ML needs both batch foundations and real-time operations
Nubank's 2025 ML operations article separates batch predictions from models answering inside live service flows, and covers a Model Server, latency, cost and shadow-mode testing.
Another article describes Avalanche, combining Kafka with Flink applications on Kubernetes for real-time processing. Streaming is a documented capability — not a reason to call the daily Spark pipeline real time.
Curated sources
The public sources behind this analysis, with our take on why each one is worth your time.
Learn what makes this work
The DataForge courses that cover the pieces of this architecture.
