Tinybird Customer Story
2weeks to ship MVP
100xfaster 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.
Steven TeyFounder and CEO at Dub
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.
Steven TeyFounder and CEO at Dub
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.
Steven TeyFounder and CEO at 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 gofrom 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.
Steven TeyFounder 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.
Steven TeyFounder and CEO at Dub