We launched Convex Components to make adding features to your app easier! 🎉

Learn more
Tunnel logo

The Two Week Migration Story

How Tunnel moved away from RDS and MongoDB

Get started
Timeline of Tunnel's journey with Convex
1
Database issues with RDS

One of Tunnel’s co-founders, Leon, was having serious issues with getting RDS to work in production. This was due to incompatibilities with their blue-green deployment model, where you deploy two identical production setups that you can swap between when pushing new changes to your app. For Tunnel, both setups were backed by the same database instance, which made RDS’s limitation of being fixed-schema quite dangerous for migrating between the two environments. RDS ended up breaking production for Tunnel multiple times with backwards-incompatible migrations. Looking for a more flexible solution, Leon went to MongoDB.

2
Database issues with MongoDB

MongoDB proved to be more flexible with the lack of a fixed schema, making migrations less of a headache. But the added flexibility came with a lack of schema validation, allowing faulty schemas to be pushed to production. In one particular incident, this caused Leon to be up all night manually repairing their database, the final nail in the coffin for Mongo. With this and the lack of type-safe libraries, it was clear that MongoDB was not the solution either.

3
Trying out Convex

Leon’s co-founders weren’t interested in doing another migration, but Leon checked out Convex and saw that it solved all of their issues with schema flexibility, type-safety, and code repurposing. Leon started working on it over the weekend to see if he could get it to work and figured out that it would only take him a week to get everything moved over.

4
Testing and migration

In going to production, in Leon’s words, Tunnel got to finally focus on just writing their product instead of writing database-specific tooling. In addition, they got all their middleware to work with Convex quickly as all Convex operations are written in pure TypeScript, which was compatible with their existing tRPC and Zod setups. The blue-green deployment strategy worked well with Convex’s flexible schema updates. Leon pointed out that using Convex created a mindset shift in the way they approached infrastructure, encouraging the team to lean on trusted third-party tools for things that were not in their core-competency. Convex’s opinionated thoughts on every part of the backend layer provided learning experiences about database management philosophy.

Get your app up and running in minutes
Get started
©2024 Convex, Inc.