How Rythm.fm uses Clickhouse for Product Analytics

This case study explores how Rythm uses Clickhouse, Kinesis with Firehose, and Mitzu for product and marketing analytics. Thank you for the insights, Oliy Barret from Rythm.
István Mészáros
March 11, 2025
5 min read
Share this post
Clickhouse and Mitzu warehouse-native integration
80%
costs savings compared to 3rd party product analytics
100%
control over business and usage data
50-100
self-service insights per week
100%
data accuracy

The company

Rythm began in 2016 as a side project among friends who enjoyed playing video games together and shared a passion for music. They created a music bot for Discord to facilitate shared music listening experiences, which quickly gained popularity, amassing over 30 million users worldwide.

In September 2021, Rythm ceased operations after receiving a notice from YouTube, leaving its community without a platform for shared music experiences. Determined to continue, the team spent the next two years rebuilding the platform, securing music licenses, and enhancing its features. By 2024, Rythm was relaunched, offering an improved experience that compensates artists for every stream, thanks to partnerships with leading music companies.

The Challenge

Rythm's main challenge is monetizing its vast number of users. The current monthly subscription fee is $4.99, but most of its users are in the free tier. Understanding why people switch to the paid plan and how long they stay paying is essential for the company.

The founding team is highly skilled and has a software development background. They don't shy away They have the technical expertise to manage complex data infrastructure, from self-hosted Clickhouse databases to AWS Kinesis with Firehose pipelines for S3 event logging. However, with their focus on product development, they lack the bandwidth to write and maintain SQL queries for data analytics, and the company hasn't yet reached the scale that justifies hiring a dedicated data analyst.

Technical Solution

The Rythm team implemented a robust data stack based on Kinesis and Firehose, S3  object storage, Clickhouse for real-time, and Mitzu as a plug-and-play warehouse-native product analytics solution.

First,  data flows from multiple client-side applications (mobile app, Discord) to an ingestion API where it undergoes schema validation before being sent to Kinesis and ultimately stored in S3 via Firehose.

This method permanently stores data in files on S3. However, the data format on S3 is not ideal for analytical processing. In order to get good performance out of the system, the raw data must be loaded to Clickhouse periodically.

Rythm hosts its own Clickhouse, allowing the team to be completely in control. The Clickhouse instance is not huge. It runs on a medium-sized EC2 (with fault-tolerant replicas).

Clickhouse is just a highly performance storage layer for the data that allows fast query access.

Most of the time, Rythm doesn't write its own SQL for data analytics. Instead, it relies on Mitzu warehouse-native product analytics. With Mitzu's self-service features, Rythm can easily track retention, measure funnels, and segment users with just a few clicks. It automatically generates the SQL queries that are executed through the native ClickHouse API.

Why ClickHouse for Product Usage Data?

Product analytics, like web analytics, deals with massive volumes of event-driven data, clicks, swipes, and interactions happening inside an application. The kinds of questions product managers and growth teams ask of this data are both time-sensitive and complex: Where do users drop off in the signup flow? What behaviors signal high customer lifetime value? Which parts of the product need better guidance or a redesign?

Answering these questions requires a data store built for speed. One that can handle high-ingestion rates, complex queries, and heavy concurrency. ClickHouse is a perfect fit. Its columnar storage and real-time ingestion make it incredibly efficient at processing large datasets, giving teams fast, actionable insights. And best of all, it’s SQL-native. This way you can explore your data without limits.

Another major advantage is ClickHouse’s compression. Its columnar design and sorted inserts deliver compression ratios of 15x (or more) on text-heavy data. That means you can afford to store every user interaction, indefinitely, without worrying about storage costs. No need to decide upfront what questions you’ll ask, just capture everything and analyze it when the time comes.

How to Setup Mitzu?

Setting up Mitzu is simple and takes only a couple of clicks:

- Setup your Clickhouse connection:

Disclaimer: Not the actual Rythm connection

- List your usage event tables:

As the last step the user must click the Index Selected button, while the tables are selected. This action will create an event catalog that is possible to use for product analytics.

Here is an example of a SQL query that Mitzu automatically creates for Product Analytics:


WITH anon_4 AS
  (SELECT t1.user_id AS _cte_user_id,
          t1.event_time AS _cte_datetime,
          NULL AS _cte_group,
          NULL AS _cte_event_property
   FROM sample_saas.block_events AS t1
   WHERE t1.event_name = 'Block edited'),
     anon_1 AS
  (SELECT anon_4._cte_user_id AS _cte_user_id,
          anon_4._cte_datetime AS _cte_datetime,
          anon_4._cte_group AS _cte_group,
          anon_4._cte_event_property AS _cte_event_property
   FROM anon_4
   WHERE anon_4._cte_datetime >= date_trunc('day', toDateTime('2025-02-14 10:10:14'))
     AND anon_4._cte_datetime <= toDateTime('2025-03-14 10:10:14')),
     anon_2 AS
  (SELECT 1 AS _ret_index
   UNION ALL SELECT 2 AS _ret_index),
     anon_5 AS
  (SELECT t1.user_id AS _cte_user_id,
          t1.event_time AS _cte_datetime,
          NULL AS _cte_group,
          NULL AS _cte_event_property
   FROM sample_saas.block_events AS t1
   WHERE t1.event_name = 'Block edited'),
     anon_3 AS
  (SELECT anon_5._cte_user_id AS _cte_user_id,
          anon_5._cte_datetime AS _cte_datetime,
          anon_5._cte_group AS _cte_group,
          anon_5._cte_event_property AS _cte_event_property
   FROM anon_5
   WHERE anon_5._cte_datetime >= date_trunc('day', toDateTime('2025-02-14 10:10:14'))
     AND anon_5._cte_datetime <= toDateTime('2025-03-14 10:10:14'))
SELECT date_trunc('day', anon_1._cte_datetime) AS _datetime,
       NULL AS _group,
       anon_2._ret_index AS _ret_index,
       count(DISTINCT anon_1._cte_user_id) AS _user_count_1,
       count(DISTINCT CASE
                          WHEN (anon_3._cte_datetime > date_add(WEEK, anon_2._ret_index, anon_1._cte_datetime)
                                AND anon_3._cte_datetime <= date_add(WEEK, anon_2._ret_index, anon_1._cte_datetime) + interval '1' WEEK) THEN anon_3._cte_user_id
                      END) AS _user_count_2,
       (count(DISTINCT CASE
                           WHEN (anon_3._cte_datetime > date_add(WEEK, anon_2._ret_index, anon_1._cte_datetime)
                                 AND anon_3._cte_datetime <= date_add(WEEK, anon_2._ret_index, anon_1._cte_datetime) + interval '1' WEEK) THEN anon_3._cte_user_id
                       END) * 100.0) / count(DISTINCT anon_1._cte_user_id) AS _agg_value
FROM anon_1
JOIN anon_2 ON TRUE
LEFT OUTER JOIN anon_3 ON anon_1._cte_user_id = anon_3._cte_user_id
GROUP BY 1,
         2,
         3
SETTINGS join_use_nulls=1

This query will calculate the retention rate of users, who did certain actions in the application.

Benefits of Using Clickhouse with Mitzu for Product Analytics

As a result of this setup, Rythm can now analyze its product and marketing data without increasing the size of the data team, spending resources on SQL query writing, or purchasing a costly external tool.

Rythm managed to improve:

- Their self-service analytics capabilities to 50-100 insights from their data per week

- 90% cost reduction compared to 3rd party analytics tools for the same volume of data

- With 100% control over their data

- Maximizing data accuracy compared to 3rd party trackers to 100%

Disclaimer: Please note that the images provided are from a demo in Mitzu and do not represent the actual numbers from Rythm.

Retention rate at Mitzu
MRR at Mitzu
Funnel at Mitzu

How to get started?

Collect data

Ingest your first and third party data to your data warehouse. If you don't yet have a data warehouse we can help you get started.

Setup Mitzu

Connect Mitzu to your data warehouse just as any other BI tool. List your facts and dimensions tables.
Create an events and properties catalog.

Start making better decisions faster

Start learning valuable insights with a few clicks only. No need to know SQL. Collaborate with your team on key business questions.

Unbeatable solution for all of your analytics needs

Get started with Mitzu for free and power your teams with data