About the company
Dub is an open-source link management infrastructure for modern marketing teams, helping marketers, solopreneurs, and enterprise go-to-market teams build short links, spin up QR codes, create referral links, and analyze affiliate links quickly and easily.
“With Tinybird, we don't have to worry about scaling a ClickHouse® database or managing ingestion and API layers. We just build and let Tinybird worry about it”
Steven Tey
Founder and CEO at Dub
Problem
Dub originally set up its analytics infrastructure using Redis Sorted Sets. While this worked for basic clickstream events and usage-based billing, it didn't scale as a compute engine for analyzing time series data. As Dub grew, queries got slower (some taking over 5 seconds), and filtering options were limited and inflexible.
Clicks are the main driver of Dub's revenue, so capturing and processing clickstream data is critical not only for users but also for how they charge for their service.
Why Tinybird
After evaluating ClickHouse, the Dub team was excited about the performance but worried about the overhead of maintaining their own cluster. Tinybird gave them all of ClickHouse's performance wrapped in developer-focused tooling and integrated ingestion, querying, and API publication - allowing them to go from zero to functional MVP in just 2 weeks.
Results
- 100x faster queries. Queries that took 5+ seconds on Redis now return in milliseconds.
- 2 weeks to MVP. From zero to functional proof of concept in just two weeks.
- Scalable ingestion. Completely offloaded all ingestion to Tinybird's infrastructure via the Events API.
- Simple integration. APIs and JSON make integration with their React frontend as simple as possible.
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

