CASE STUDY

Finance

Establish Credit: a financial platform built for startups

How Tribal Credit uses CockroachDB to expand their business to new regions and help startups across the globe bridge the financial gap

  • 2K+ customers

  • 3 countries

  • $60M Series B

  • 120 engineers

  • 1,000 tps

  • 6 years in business

About Tribal Credit

If you’ve ever worked at a startup, you know that managing finances early on isn’t the easiest task and can come with a lot of added pressure. Opening up new bank accounts, building credit, making cross-border payments – startups need flexibility and security when betting on the future of their business. 

Existing traditional banking processes, interfaces, and underwriting methods don’t meet startups’ needs when it comes to transparency and getting control over their finances. Ultimately the traditional banking infrastructure is too rigid and is not scalable for startup or small-to-medium-sized business (SMB) economies.

Tribal Credit was founded to bridge the gap between what traditional financial services offer vs. what startups and SMBs actually need. They deliver a fully-featured B2B fintech solution that is supported by a proprietary credit scoring model and a value proposition that consolidates the overall accounts payable life cycle. 

Tribal Credit customers can request an unlimited number of virtual and physical cards for their employees. Backed by VISA Business, the cards can be used for any type of purchase. They also support issuing cards in different currencies — meaning their customers can use those cards to pay in local currency and avoid foreign exchange fees.

Currently they have more than 2K customers worldwide. Their business started in the U.S. in 2016, but over the past few years they’ve expanded to new regions. As they grew their business beyond borders, their infrastructure started to reveal some limitations.

“Since the start of the pandemic, we’ve seen an increasing demand to shorten the distance of B2B accounts payable lifecycle, and the need for agile online payments to support this global, digital-first economy has accelerated. For us to deliver the best customer experience, we need a globally scalable and distributed platform that can support us now and grow with us in the future.” - Cesar Berho Gallardo, CTO

Don’t find yourself in [tech] debt

The team at Tribal Credit originally built their platform using SQL Server and MySQL as their primary databases. They said that relational database management systems (RDBMS) worked well for their initial use cases and allowed them to find product-market fit. 

“Do things that don’t scale” is a common approach startups take when building their first MVP. They typically have a small team of engineers who have to hit a lot of development milestones in very limited time. Scale is often sacrificed early on in order to quickly deliver the first iteration of their product to market.  

Since Tribal Credit’s initial version was released into the wild 6 years ago, they’ve found tremendous demand for their platform. The team grew to 120 engineers to support business momentum. High demand meant that they needed to find a way to scale without creating too much manual labor, but also without taking on too much tech debt. Both of these drawbacks become painful when you are forced to manually shard a legacy RDBMS and implement synchronous replication to avoid data loss (or data inconsistencies) in the event of a failure.  

Beyond scaling, the company also needed a globally distributed platform that was compliant with both industry requirements and regional legislations. This would require a more advanced solution — one that could give them the ability to replicate data across regions and control where that data resides.

Essentially Tribal Credit’s requirements evolved with their success, from a country-specific application to a globally distributed platform. This meant that they needed a database that could deliver:

  • Easy horizontal scale
  • Automated replication
  • Ability to expand across multiple regions 
  • SQL compatibility 
  • Data residency control 

They evaluated Cassandra, MongoDB, and Yugabyte for various use cases. However, they realized that they would likely have to use a combination of these databases to support different workloads, which ultimately could make their architecture even more complicated. 

One of Tribal Credit’s lead software architects, Julio Monroy Quirarte, suggested that they try CockroachDB. He had heard about CockroachDB at a conference and thought that the demo was very appealing and its attributes felt like a database of the future.

“A distributed database that’s capable of performing in multi-active mode, delivers automated scale, and has the ability to replicate data across regions were important features to us. We are also fans of PostgreSQL, so finding a way to have a PostgreSQL-like database and distributed features in the form of PaaS was like a dream.” - Julio Monroy Quirarte, Software Architect

A stack that can scale

The Tribal Credit team started using CockroachDB as part of a project to split their monolithic application into microservices. They were able to get their first set of services into production within a month. Because CockroachDB is Postgres-wire compatible, they didn’t have to learn a new language and could continue using SQL.

“We were amazed by CockroachDB’s compatibility with PostgreSQL. We were expecting just some level of compatibility and a lot of constraints, however, we are able to use most of the features that we were expecting from a full-blown PostgreSQL instance. Being able to reuse our SQL knowledge is a great advantage.” - Julio Monroy Quirarte, Software Architect

Their application is written in Golang and they use Kubernetes to manage their microservices. They also use Kafka for event streaming, Redis as a data cache, and Snowflake as a data warehouse.

Currently they are running in a single AWS region (US-West-2) but they plan to expand to 3 regions in the near future to reach new markets in Latin America. One of the bonuses of working with a distributed database is that it takes care of the heavy lifting for you and you don’t have to worry about adding complexity in the application layer when you want to scale to a new region.  

Using CockroachDB makes it easy for Tribal Credit to scale from one region to many with simplified multi-region deployments — basically, four settings (two are optional) that are set up with simple SQL statements. For example, when they add a second region in Sao Paulo, CockroachDB will function as a single logical database across both regions. This means that data can be accessed via any node in any region. Data is written to the region closest to the user and it is replicated across multiple nodes in each region.

If a node in a region goes down, all that region’s reads and writes will be handled by other nodes in that region. If an entire region goes down, CockroachDB will automatically spread out data across the remaining available regions. 

They are handling mostly transactional data which comes in the form of customer purchases, payments, and balances. Their traffic is steadily increasing on a daily basis, and they expect to cross the 1,000 transactions per second (TPS) mark by the end of the year. 

Since Tribal Credit is handling money, their survivability goal is high and extending their application across multiple regions ensures high availability. Additionally, it helps maintain the integrity of their data and CockroachDB guarantees consistent transactions even in the event of a failure.

“The ability to deploy CockroachDB in multiple regions and just let it do its work has greatly simplified our architecture. We don’t need to worry about performing sharding or data replication at the application level; we can confidently deploy our platform in new regions and know our data will be in sync.” - Julio Monroy Quirarte, Software Architect

What’s Next

Tribal Credit’s services are currently offered in the US, Mexico, and the Middle East and North Africa (MENA). They plan to expand through Q3 and Q4 to Chile, Colombia, Peru, and Brazil in the near future. With CockroachDB, they can continue to add regions and seamlessly scale their application into new territories. 

Over the next five years they envision that Tribal will be thriving in emerging markets, breaking the status quo with innovative financial solutions, and extending crypto-based solutions that will converge the best of both worlds supporting the modernization of economies.

Ready To Get Started?