Nubank is the digital bank that started with a credit card in Brazil and now serves millions of customers across Latin America. From day one it bet on Clojure, the Datomic database and Kafka on AWS, later moved everything to Kubernetes and went on to buy the company behind Clojure.
Lucas Cavalcanti, one of the first engineers, explained the early choices at QCon. Datomic is an immutable database that keeps the history of every change, which gives a bank auditing for free. Clojure runs on the JVM and pushes the code toward simplicity, and financial logic fits functional code well.
Kafka was picked because messages stay stored and you can reset offsets to reprocess old ones, which saved them a few times. Everything ran on AWS so a small team would not have to manage machines.
Between 2015 and 2016, instead of sharding only the database, Nubank started running full copies of the whole system, each serving a slice of customers. It put off complex code optimizations, at the cost of one shard growing much bigger than the rest.
In 2017 and 2018 they replaced CloudFormation with Kubernetes, migrating shard by shard with the bank still live, and later moved to Amazon EKS.
By 2019 Nubank described its backend as horizontally scalable microservices written mostly in Clojure with Finagle, using hexagonal architecture, with Kafka between services and Prometheus for monitoring.
In July 2020 Nubank acquired Cognitect, the company behind Clojure and Datomic, which had worked with it since 2014. Rich Hickey kept leading Clojure as an independent open source language.
Native mobile specialists were hard to hire, so in 2019 a task force of senior mobile engineers compared Kotlin Native, React Native and Flutter. Kotlin Native had no UI layer yet, and React Native leaned on too many third-party dependencies.
Flutter won on testing and developer experience, and became the default for new features in the app. Native Kotlin and Swift developers still handle platform-specific work.
Data transformations are written in Scala on Spark, and analysts code in Databricks notebooks. Processed data lands in S3 and Google Cloud, and people query it through Databricks, BigQuery and similar tools.