Nubank architecture visualization
All architectures
Technical deep dive

Nubank

From Clojure microservices to Spark analytics: the data foundations behind digital banking.

Numbers that matter

500
Clojure microservices
Reported in July 2020
600
Clojure developers
Reported in July 2020
60,000+
Analytical datasets
Reported in November 2024
1,000+
Monthly data contributors
Reported in November 2024

The stack

Clojure· backend services
Datomic· business data
Kafka· asynchronous messaging
Amazon S3· data lake storage
Scala / Spark· batch transformations
Databricks· analytical access
BigQuery· analytical SQL
Model Server· real-time ML inference

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.

How to read this diagram
Boxes = components

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.

Arrows = data flow
streaming· live eventsbatch· scheduled jobsync· direct callserve· user-facing
Click any step to explore
extractiontraining datastreaming apps
Clojure servic…Computeclick →
DatomicStorageclick →
KafkaStreamingclick →
S3 extractionStorageclick →
Scala / SparkComputeclick →
Processed S3 d…Storageclick →
Databricks / B…Servingclick →
ML platformMLclick →
Conceptual synthesis of public descriptions from different years, not a production topology. Batch extraction and Spark processing are distinct from Kafka-based streaming.
Optional
Read the full written deep dive
The 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.

Last updated:
← See all architectures