Tinybird Customer Story

Resend delivers email metrics to builders with Tinybird

Learn how Resend processes terabytes of email event logs while maintaining 62ms average query latency for its Marketing Analytics dashboards.
Start building
No credit card required

Tinybird is exactly what we need it to be: infrastructure and tooling to ship analytics features. It eliminated what would have otherwise been a complex infra project and allowed us to focus on building a great email platform.

Zeno Rocha

Zeno RochaCo-Founder & CEO at Resend

100TBdata processed/month

62msp90 query latency

2weeks to production

Resend is an email platform for developers to build, test, send, and measure transactional and marketing emails. With Resend, developers at companies like Warner Brothers, Supabase, and Fey can build and send emails with SDKs for their favorite programming languages. Resend is the best way for developers to send beautiful emails at scale.

Resend faced scalability challenges with growing logs.

Developers love Resend for its simple and integrated workflow to generate and send emails as code. In 2024, Resend released its now-popular Broadcasts feature, expanding its reach beyond transactional emails and into the big bad world of marketing.

While there's always been some marginal benefit in analyzing transactional email performance, marketing emails demand rich analytics. Resend wanted to equip SaaS builders and growth-minded founders with a great analytics experience to monitor email performance and optimize campaigns. Every marketer wants visibility into key email metrics such as delivery rates, bounces, clicks, opens, and unsubscribes, and SaaS founders are no exception.

Like many, Resend originally built its email platform around a core Postgres database. When exploring using this database to store event logs generated by Broadcast emails and run analytical queries, they quickly saw a problem.

Email metrics don't generally involve exceptionally complex analytical queries; knowing who opened an email is about as simple as countIf(event_type = 'open'). But in the early days of Broadcast, Resend had already racked up 4 TB of logs, and even simple filtered aggregate queries were timing out on Postgres. Since they intended to integrate these analytics metrics into their application - and include dynamic filtering - they couldn't afford slow queries that would kill the UX.

Finding alternative infrastructure to support user-facing analytics

Bu Kinoshita, co-founder at Resend, discovered Tinybird on Twitter as other engineering-led SaaS companies were using it to build similar things. He checked in with his peers on their Tinybird experience, liked what he heard, and started to explore a proof of concept with support from Tinybird engineers.

Initially, Bu mainly considered Tinybird for log storage and search, but he quickly realized it was the perfect piece of infra to underpin their Marketing Analytics feature.

While building a proof of concept, Bu sought answers to two questions:

  1. Would Tinybird solve Resend's slow query issue?
  2. Would Tinybird be better, faster, and cheaper than spinning up their own infra?

Performance at scale

Whereas Postgres struggled to handle the queries Resend wanted to build for its analytics feature, Tinybird excelled. In production, Tinybird has achieved p90 query latencies of under 100 ms.

The result is a snappy and responsive user analytics experience, even without relying on cache. Resend's customers get the freshest email performance data in real-time using the APIs Resend built with Tinybird.

Resend's Marketing Analytics feature

As a small team we wear many hats. We couldn't afford to spend time managing complex infrastructure like ClickHouse. Tinybird lets us focus on building our product instead.

Bu Kinoshita

Bu KinoshitaCo-Founder & CTO at Resend

Faster time to prod

Resend does a lot with a little, maintaining a lean engineering team that doesn't waste time on side quests or wheel reinventions. The team didn't want to spend time or resources learning, building, and maintaining data infrastructure. Like many SaaS products, they face real choices between building custom infra or building new product features.

Tinybird stood out against alternative analytics databases like ClickHouse because it offered not just a database, but infrastructure and tooling that handled ingestion, storage, compute, and API deployment in a single, integrated development flow. This gave Bu confidence that Tinybird was not only great for performance, but also great for shipping.

Using Tinybird, engineers at Resend built and released their Marketing Analytics feature in two weeks. The benefits:

  • They didn't worry about setting up a ClickHouse cluster
  • They didn't struggle with setting up streaming or data pipelines
  • They didn't need to create an analytics backend

They wrote some SQL, published API endpoints, and integrated them into their Next.js app

2 weeks to prod. That's it. Tinybird made us more productive because it's easy to set up and requires basically no maintenance. If we need to tweak an API or add something new, it is just a git commit that we can merge and promote in CI/CD.

Bu Kinoshita

Bu KinoshitaCo-Founder & CTO at Resend

Tinybird is integrated into Resend's dev flow.

For Bu and the engineers at Resend, the choice to go with Tinybird was based on one thing: speed. They knew that a fast database would make their queries fast. But with Tinybird, their developers are fast, too.

Tinybird eliminates the need to build and maintain the otherwise complex infrastructure they would have needed to achieve what they've built. It abstracts the hard parts of real-time analytics into SQL and APIs. And it integrates perfectly with their existing git-based CI/CD workflows, making for fast, safe, and repeatable production deployments over time.

Tinybird just fits into the daily work that you're used to - you just write code locally, push it Github, and the CI triggers the build. Tinybird integrates into this experience so that you don't have to change the way you work or learn the Tinybird way to do things.

Bu Kinoshita

Bu KinoshitaCo-Founder & CTO at Resend

Do you like this content?

Build fast data products, faster.

Try Tinybird and bring your data sources together and enable engineers to build with data in minutes. No credit card required, free to get started.
Need more? Contact sales for Enterprise support.