🚀
Introducing Versions: Develop data products using Git. Join the waitlist

Tinybird Customer Story

Dub shortens time to market for user-facing analytics with Tinybird

Learn how a fast-rising short link platform builds fast user-facing analytics dashboards and tracks its usage-based billing with Tinybird's end-to-end operational analytics platform.

No credit card needed

"With Tinybird, we don't have to worry about scaling a database. We don't have to worry about spikes in traffic. We don't have to worry about managing ingestion or API layers. We just build and let Tinybird worry about it."

Steven Tey, Founder and CEO at Dub

~6.6 TB

weeks to ship MVP

+80

faster queries

Dub is an open-source link management infrastructure for modern marketing teams. Marketers, solopreneurs, indie hackers, and enterprise go-to-market teams use Dub to build short links, spin up QR codes, create referral links, and analyze affiliate links quickly and easily.

At Dub, data is a critical part of the product offering. Not only can Dub users quickly build and manage short links, but they can also track every single click of those short links through an intuitive user-facing analytics experience.

For Dub founder and CEO Steven Tey, a world-class analytics experience was table stakes. Dub users need detailed insights for every click, from location data to device information, bot traffic, and referrals.

In addition, beneath the user-facing analytics was the very foundation of the company's revenue stream. Dub's business model is based on clicks. Each service tier has an allotment for total link clicks, and Dub's platform must carefully track each click both for user-facing analytics and usage-based billing.

"Clicks are the main driver of Dub's revenue. The clickstream data that we capture and process is critical not only for our users but also for how we charge for our service."

Steven Tey, Founder and CEO at Dub

1

Dub's existing analytics infrastructure did not scale

Dub originally set up its analytics infrastructure using Redis Sorted Sets. While this worked well as a basic way to capture and store clickstream events for usage-based billing and some simple analytics, it didn't scale as a compute engine for analyzing the time series data and publishing it to end users through the application.

As Dub grew, the analytics experience with Redis got worse. The queries kept getting slower, and query filters were limited and inflexible, making it difficult for the Dub team to calculate aggregations over various columns like location, referrer, device, etc.

"We currently process over 5 million clicks per month, growing at about 30-50% month over month. We originally used Redis Sorted Sets to store and query clickstream data, but it was inflexible and slow. Some queries took over 5 seconds, which made for a horrible user experience in the product."

Steven Tey, Founder and CEO at Dub

2

Searching for a better time series database

Dub began searching for a database better suited for its growing time series data. After evaluating ClickHouse, the team at Dub saw potential. ClickHouse provided a powerful and efficient compute engine for time series analytics with columnar storage optimized for fast write throughput and even faster analytics queries.

But the Dub team balked at setting up and maintaining their own ClickHouse cluster, worrying that it would become a resource sink for its relatively small team. They didn't want to waste resources on scaling database infrastructure. They just wanted to build and ship new features.

"We were excited about the performance of ClickHouse, but not the overhead. I heard about Tinybird from my colleagues at Vercel and realized it was the perfect platform for building user-facing analytics at Dub."

Steven Tey, Founder and CEO at Dub

3

Tinybird was the ideal user-facing analytics platform for Dub

The team at Dub chose Tinybird as its real-time, user-facing analytics platform. They understood that with Tinybird they would get all of the raw performance of the underlying ClickHouse database, but without the hassle of maintaining a database.

The benefits extended well beyond just having a "managed ClickHouse". Because Tinybird integrates the ingestion, querying, and publication elements of a real-time data platform, the team at Dub was able to go from zero to functional MVP in just 2 weeks.

They use Tinybird's Events API, a simple HTTP streaming endpoint that can handle thousands of requests per second. Whenever somebody clicks a short link created in Dub, the platform fires an event to Tinybird directly from the application code.

"We utilize Tinybird's ingestion endpoint, so we've completely offloaded all of the ingestion to Tinybird's infrastructure. And we never have to worry about it ever being too many clicks."

Steven Tey, Founder and CEO at Dub

With Tinybird's integrated API layer, Dub can convert any SQL query into a RESTful HTTP endpoint in seconds, massively simplifying the way it interacts with the underlying database.

Using a simple React hook, they can display and update in milliseconds real-time analytics that provide various metrics aggregated over different columns. When a user refreshes the page or navigates back to Dub, they find up-to-the-second click metrics based on the freshest data.

"I'm amazed with Tinybird. We get all of the performance of a very fast database, but everything is just APIs and JSON, so the integration with our application is as simple and efficient as possible. For a full-stack developer like me, Tinybird is truly the go-to platform for user-facing analytics."

Steven Tey, Founder and CEO at Dub

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.