Eight years ago, Stash founders Brandon Krieg and Ed Robinson had a hunch that Americans wanted to invest, but they didn’t know how or where to start. While working on Wall Street, they took to the streets, asking New Yorkers if they invested in the stock market. The common refrain: “No, but I want to.” People of different backgrounds considered investing to be too expensive, intimidating, and complicated.
Stash was born from this experiment with a mission to empower people to invest and build better lives. Today, Stash’s investing app does exactly that for 2 million active subscribers. Stash’s plans — which start at just $3 a month — provide simple, cost-effective access to a suite of simple, automated solutions designed to give people the access they need to improve their lives through investing.
In 2022, the company launched its new back-end infrastructure, Stash Core, along with major updates to its managed portfolio product, Smart Portfolio, and its investing tools. Building a new banking infrastructure from scratch is a massive undertaking — especially with an aggressive GTM timeline. The Stash team knew they had to select the right foundation and partner with the right company. Enter CockroachDB.
Why Stash built their banking infrastructure on CockroachDB
Achieving five-nines of availability and delivering an ideal customer experience
A highly available bank built on CockroachDB
When Stash engineers started designing their new banking infrastructure, they built an initial design on PostgreSQL while also integrating a wide variety of partners for other capabilities. (One massive benefit of its new back-end infrastructure is the ability to integrate best-of-breed technologies for many different use cases). When they started building, a lot of the engineers were already familiar with PostgreSQL and knew that it delivered data consistency and a resilient foundation, which are both crucial capabilities for handling money.
However, a mission-critical banking platform has two other important requirements: 1) achieving five-nines of availability and 2) building on a multi-region, multi-cloud foundation. They never wanted their customers to worry about incorrect balances or run into latency issues when spending money. Looking to the future, it also made sense for Stash to build a platform that could easily scale to multiple regions and replicate data across those regions for an even better fault-tolerant setup.
While these requirements are technically possible with PostgreSQL, they’re complicated to set up and even harder to maintain. One of the Principal Engineers on the project suggested taking a look at CockroachDB, a cloud-native distributed database that met their requirements:
“There’s a lot of databases out there on the market. However, on paper, CockroachDB met all of our requirements to build a highly available platform. We felt like we were making an informed decision about our tech stack, and CockroachDB truly lived up to the expectations that it promised.”
– Michael Swendener, Senior DevOps Engineer
Though the Stash Core project took years to implement in full, Stash’s GTM timeline for this aspect of the new banking infrastructure was a compact six months. After the development phase, the team reports that they had “no issues getting into production with CockroachDB.” After a successful soft launch in September 2022, they opened the platform up to all customers in December 2022.
CockroachDB serves as a system of record (or source of truth) for the entire banking infrastructure. It processes and stores all types of mission-critical workloads, including banking data, customer data, PII, accounting info, and more.
Right now, Stash is self-hosting CockroachDB in a single AWS region and plans to expand out to four regions in the near future. They’re running a multi-region cluster now to test its functionality before moving into production. As mentioned above, running your application across multiple regions and multiple clouds is a great approach when designing fault-tolerant systems and reducing risk for your business.
Stash also uses Kubernetes alongside CockroachDB. Since CockroachDB and K8s have the same distributed principles, they work well together and make it easier for engineers to build distributed applications.
“CockroachDB is our source of truth… It stores everything for our banking partner. When building a mission-critical application, we wanted to choose the right technologies that would guarantee our customer’s data would never be at risk. CockroachDB lived up to its expectations that it promised.”
– Jordan Larrigan, Engineering Manager
“The support we received from the Cockroach Labs team saved us a tremendous amount of hours during the development cycle. We didn’t have to hire extra people to help us execute at a really fast pace. The support we received and the confidence we felt made a massive difference.”
– Jordan Larrigan, Engineering Manager
As Stash moves into a multi-region setup, they’ll continue to take advantage of CockroachDB’s advanced features. The engineers are already eager to see what they can do better and faster.
Stash is available in the US market now, but international expansion could be in the future. When you build on a multi-region, multi-cloud foundation, it becomes substantially easier to grow your business into new regions.
Stash’s immediate focus is to empower their customers to feel confident as they begin their investing journey, and today, the pioneering fintech is ready to deliver.