Dec 1, 2021

How Airheart scaled to 500,000 travelers globally in less than 6 months with GraphCDN

Airheart is a startup that offers a tool designed specifically for collaboratively planning group travel itineraries. They launched their product in May 2021, during the height of the Corona pandemic, and almost immediately attracted more than 80,000 users. They had to scale quickly to be able to sustain their fast growth while keeping costs as low as possible.

Let's dive into their architecture to understand how GraphCDN helped Airheart scale.

Technical architecture

Airheart's website consists of over 50,000 pages showing the latest travel regulations for all the different countries. The pages are rendered using React & Next.js, which fetches the data from a unified GraphQL API.

Following the immediate explosion in usage after the launch, they realized that their origin couldn't handle the load. Most of their database queries are complex, involving nested data and subquery joins, and the results are the same for every user --- in theory an ideal situation to leverage caching as a way to reduce load.

However, due to the ongoing global pandemic, travel regulations across different countries are changing constantly. Showing their users outdated information would be a nightmare scenario that Airheart can't allow.

GraphCDN's GraphQL edge cache, with its instant worldwide purging, was the perfect solution to enable them to add caching to their stack while ensuring their users always see the latest information.

GraphQL caching results

GraphCDN's GraphQL edge cache reduced Airheart's overall origin traffic by more than 65%, with some of the most complex queries reaching cache hit rates of up to 97%. This alleviates a lot of pressure from their Google Cloud SQL database, which is the most expensive part of their setup.

That, in turn, reduces Airheart's overall infrastructure costs by about 40% and helps them avoid a common problem with Google Cloud Run where cold starts timeout during traffic spikes. Finally, GraphCDN's GraphQL edge cache also provides their over 500,000 users worldwide with super fast 50ms response times, no matter where they're currently traveling.