Aug 13, 2024

Tinybird vs. ClickHouse®️: What's the difference?

Tinybird is a real-time data platform for user-facing analytics, built using ClickHouse. Here are the differences between Tinybird and other ClickHouse solutions, including self-hosted and managed.
Ariel Pérez
Field CTO

ClickHouse is an open source columnar database ideally suited for real-time analytics. It's fast, powerful, and flexible for a wide range of analytics use cases.

Tinybird is a data platform for user-facing analytics built on top of open source ClickHouse. It offers the performance and functionality of the ClickHouse database in a convenient abstraction that reduces developer friction and shortens time to production.

We're often asked how Tinybird is different from ClickHouse, and when developers should choose Tinybird over ClickHouse (open source or managed), and vice versa.

Here's the TL;DR:

You might choose Tinybird if:

  • You want a fast and scalable analytics backend that minimizes developer friction
  • Prefer a solution that comes pre-optimized and tuned for user-facing analytics.
  • Want to avoid building and managing infrastructure, both for the database itself and ancillary services
  • You don't care to learn deep ClickHouse internals
  • You want additional tooling on top of the database to help you ship to production faster.

You might choose ClickHouse (open source or managed) if:

  • You prefer to control and customize the database instance for your specific use case.
  • You want more granular control over your database, including direct access to internal configurations.
  • You are prepared to invest in learning ClickHouse’s internal mechanisms to fully leverage its capabilities.
  • You can take the time to understand ClickHouse internals
  • You prefer to host your database on-premises or require more control over cloud deployment.

If you're ready to try Tinybird based on that info, you can sign up here. There's a generous free tier with no time limit and no credit card required.

Here goes the Iceberg!

If you want more detail, you can keep reading.

What is ClickHouse?

ClickHouse is an open source, column-oriented SQL database management system. It was originally developed by Alexey Milovidov during his time at Yandex to power Yandex.Metrica, the second largest web analytics platform in the world. In 2016, ClickHouse was open sourced by Yandex and has been used for real-time analytics at scale by companies like Uber, eBay, Cisco, Spotify, Netflix, and many others.

What is Tinybird?

Tinybird is a serverless real-time data platform for building user-facing analytics. It was founded in 2019 with a mission to give developers tools for working with real-time data at scale. Tinybird uses ClickHouse as its underlying database, providing abstractions and services on top of the database to make it easier to use. Our company includes many contributors to the open source ClickHouse codebase, and we frequently ship important improvements to the project. Engineers at companies like FanDuel, Canva, and Vercel use Tinybird to build and ship user-facing analytics features in their respective products.

How to compare Tinybird and ClickHouse

As with many open source database management systems, ClickHouse can be self-hosted (on-prem or cloud) or purchased as a managed service through a vendor.

I won't belabor the pros and cons of self-hosting a database or buying a managed version. If you are dead set on self-hosting your database, then Tinybird is not for you. Just work with the open source version of ClickHouse.

If you intend to use a managed service for ClickHouse, or are at least considering it, then you have options. For the sake of this discussion, we'll focus on two of the most popular: Tinybird and ClickHouse Cloud.

While both Tinybird and ClickHouse Cloud provide managed services for ClickHouse, Tinybird adds additional infrastructure and services to accelerate the development of real-time user-facing analytics. These services include ingestion connectors and load balances, API hosting, and observability tools designed to reduce the complexity of building around the ClickHouse database.

Ultimately, Tinybird focuses on making it easier to build applications on top of the ClickHouse database by abstracting many database management details and offering built-in services that enhance performance and reduce development time for most user-facing analytics use cases.

Here are some of the ways Tinybird and ClickHouse differ in their approaches to infrastructure and database management, performance, cost, and developer experience.

Infrastructure & Database Management

Both Tinybird and ClickHouse Cloud offer a managed service for ClickHouse service that simplifies the job of maintaining a database.

Both are available on multiple clouds (AWS, GCP, Azure) across various global regions.

Both handle automatic updates on the database technology as new features are merged and released.

Both offer a web-based UI for interacting with the database with varying levels of abstraction.

Both provide some level of services on the write and read sides of the database, including various managed ETLs, static endpoints for queries, etc.

In addition, Tinybird and ClickHouse Cloud share most of the underlying features of the open source ClickHouse database, such as the SQL language and materialized views.

Differences in how Tinybird and ClickHouse manage infrastructure

In simple terms, Tinybird is a higher level of abstraction than ClickHouse Cloud. Tinybird offers an out-of-the-box tuned database cluster optimized for user-facing analytics use cases. Many of the finer details of database management are abstracted and not exposed to the end user.

ClickHouse Cloud exposes more database internals

ClickHouse Cloud gives the user more control over the underlying database settings. With ClickHouse Cloud, you can connect directly to the ClickHouse client, and you have more control over how you tune your database for your use case.

While Tinybird exposes most of the underlying database features, a few niche features are purposefully disabled for performance or security reasons. For example, Tinybird does not support a small set of SQL functions, a few data types, and some of the ClickHouse Table Engines. For 99% of use cases, this is not problematic, but it bears mentioning.

Both Tinybird and ClickHouse Cloud have opened waitlists for "Bring Your Own Cloud" (BYOC) deployments. You can get on Tinybird's BYOC waitlist here.

Tinybird carefully manages database upgrades

Both ClickHouse Cloud and Tinybird deploy automatic upgrades to the database as new versions of ClickHouse are released.

Tinybird also handles a lot of the complexities of upgrading the database. As with any software, updates can introduce regressions or breaking changes. Whenever a ClickHouse update is released, Tinybird typically upgrades clusters within a few days. 

Tinybird checks all existing customer queries and table schemas against the main branch daily to check for regressions and prevent breaking changes. The upgrade process is done in phases so that only parts of a cluster are changed, and read and write paths are checked along the way to ensure compatibility and high availability.

Tinybird offers more built-in services for ingestion, integration, API hosting, and observability

Beyond database management, Tinybird offers more ancillary features alongside the database so you don't have to build them yourself.

On the ingestion side, Tinybird has more native data source connectors, includes a managed HTTP streaming endpoint, and provides built-in infrastructure for queuing and handling on-demand and scheduled import and export jobs.

In addition, Tinybird provides more services on the read side of the database. Tinybird is famous for its "single-click" API generation flow, in which you can instantly publish any query as a static, named, and secured API endpoint complete with dynamic query parameters, auto-generated OpenAPI 3.0 specs, and support for both static access tokens and JWTs to secure read access with row-level security policies.

Tinybird also offers built-in observability at both the database level and the UI. Every job, call, or query is logged in a Service Data Source, which can be queried free of charge. Tinybird users can build APIs to monitor ingestion throughput, identify API errors, alert on failed jobs, and more. Tinybird offers a built-in time series charting UI for log analysis and integrates well with observability tools like Grafana.

In effect, Tinybird minimizes your development surface area. If you choose Tinybird, you will need to build or source fewer additional services than you otherwise would with self-hosted or managed ClickHouse.

A concise comparison of infrastructure features between Tinybird and ClickHouse Cloud is included below for reference:

FeatureTinybirdClickHouse Cloud
Uses ClickHouse as the databaseYY
Managed service simplifying operationsYY
Managed Kafka Connector (including Kafka compatible services)YY
Managed Snowflake ConnectorYN
Managed S3 ConnectorYBeta
Managed GCS ConnectorNBeta
Managed Kinesis ConnectorNBeta
Managed BigQuery ConnectorYN
Managed DynamoDB ConnectorYN
Ingest from uploaded filesYY
Ingest from files on remote URLsYN
Managed HTTP streaming ingestion endpointYN
Managed queues for batch import jobsYN
Managed queues for batch export jobsYN
Managed S3 Sink (push to S3)YN
Managed Kafka Sink (push to Kafka)BetaN
Available on AWSYY
Available on AzureNBeta
Available on GCPYY
Available on BYOCWaitlistWaitlist
Supports tiered storageYY
Supports local storageYY
Ingestion failure handlingYY
Automatic database updatingYY
Exposes most database settings for manual tuningNY
OOTB tuning for high-concurrency, real-time queriesYN
Connect PostgreSQL clientsYY
Connect MySQL clientsBetaY
Connect ClickHouse clientsNY

Performance

Tinybird is built on top of the Clickhouse open source database, and so the performance you get from Tinybird will likely be on par with what you would get from any hosted ClickHouse instance running on similar compute. ClickHouse's performance benchmarks readily apply here.

Performance does depend on compute, of course, so the nature of how ClickHouse is hosted will impact performance. Tinybird doesn't eschew performance for ease of use. In fact, Tinybird's engineers regularly contribute performance improvements to the open source ClickHouse project (examples here, here, and here).

With Tinybird, all non-Enterprise plans are hosted on shared infrastructure scaled to meet demand at a high level of performance for the vast majority of use cases. Even on shared infrastructure, many Tinybird customers readily achieve 20+ MB/s write throughput and 1K+ QPS with <50ms p95 query latency out of the box.

Where more resources are needed, Tinybird's Enterprise plans allow the option for dedicated infrastructure that can be independently scaled, further extending Tinybird's performance to the limits of ClickHouse itself.

And though Tinybird can scale compute as needed to handle the load, we also focus heavily on optimization. We have a team of data engineers who work directly with clients to continually optimize queries to increase compute efficiency without adding more cores. For our clients, that means faster queries without consuming more infrastructure credits or usage quotas.

Other managed versions of ClickHouse, such as ClickHouse Cloud, are designed to give you more control over compute size and are priced according to the size of compute you select. You can choose the machines you need to provide the necessary performance for your use case. For shared infrastructure, Tinybird chooses to abstract this selection and handle scaling compute on an as-needed basis.

Cost

The cost of managing ClickHouse can be expressed in terms of infrastructure (storage and compute) and development time for setting up, maintaining, and scaling the database.

Cost of self-hosting ClickHouse

Self-hosting ClickHouse will (hopefully) result in lower infrastructure costs but at the expense of much higher development costs to manage the cluster.

If you want to better understand what it costs to self-host ClickHouse, check out this resource from the GitLab Handbook, which includes GitLab's assessment of costs associated with their own self-hosted ClickHouse instance. There's a full GitLab issue with cost tables and explanations of all the variables that influence self-hosting costs.

If reading that GitLab issue feels as cumbersome to you as it does to me, then you are probably leaning toward a managed service that makes understanding costs much more predictable while also removing at least some of the associated development costs.

Cost of ClickHouse Cloud

Managed versions of ClickHouse such as ClickHouse Cloud are designed to abstract some, but not all, of the complexities of managing the underlying database. With ClickHouse Cloud, you'll pay for the cost of storage and compute plus any additional time spent fine-tuning the database or building ancillary services.

ClickHouse Cloud currently offers a time-limited free trial, but ongoing development clusters clamped at 16 GiB RAM, 2 vCPUs, and 10 GB of storage will cost up to $160 per month depending on cloud provider and active hours. A production-grade cluster with 96 GiB RAM, 24 vCPUs, and 500 GB of storage will cost up to $2,500 per month depending on cloud provider and active hours. You can calculate ClickHouse Cloud pricing based on storage and compute size with the ClickHouse pricing calculator.

Cost of Tinybird

Tinybird is designed to eliminate the development costs associated with managing a database while offering comparably priced access to storage and compute.

Tinybird offers both zero-to-scale usage-based pricing and infrastructure-based pricing. All non-Enterprise plans are subject to standard usage-based pricing at $0.34/GB of compressed storage and $0.07GB of processed data.

Additionally, Tinybird offers a time-unlimited free development plan that includes 10 GB of storage, unlimited data processing, and up to 1,000 API requests per day on published Endpoints. 

93% of non-enterprise Tinybird customers on paid plans pay less than $100/month for their production Workspaces. The median non-Enterprise paid Tinybird Workspace costs less than $10/month.

Tinybird's Enterprise customers can choose to have access to dedicated infrastructure and can select pricing plans based on usage quotas or infrastructure credits. All Enterprise plans come with steep volume discounts for storage and compute. 

For more information about Tinybird pricing, check out the public pricing page or find more detailed explanations of how usage is calculated in the pricing docs.

Developer Experience

If you could capture the Tinybird ethos in a sentence, it's this: "Fast databases make queries fast. Tinybird makes developers fast." Tinybird intentionally abstracts the complexities of both ClickHouse and the additional infrastructure you'd have to build for a fully-baked analytics service so that you can become productive more quickly.

Put simply, developers often choose Tinybird because they want to focus on their use case and shorten their time to production. They want the performance that ClickHouse offers, without the added effort to manage it.

Tinybird offers time-saving features that self-hosted and various managed services for ClickHouse versions don't, including:

A summary of time-saving Tinybird features is included below for reference.

FeatureTinybirdClickHouse Cloud
One-click publish REST APIs from SQL queriesYBeta
Dynamic query parameters in REST APIsYBeta
Supports over 50 billion API requests per yearYN
Auto-generated OpenAPI specs for REST APIsYN
Secure REST APIs with custom JWTsYN
Generate interactive charts from REST APIsYN
Full-service management via APIYY
Full-service management via CLIYY
Git integration for automated CI/CDYN

When to choose Tinybird

Tinybird, managed ClickHouse, and self-hosted ClickHouse all provide excellent performance for real-time analytics use cases.

The choice between these options will depend on your goals and constraints: desired speed to market, budget, time, and engineering resources. 

Those with time, budget, and solid data engineers with a desire to learn ClickHouse might choose to self-host. 

Those who want a more classic ClickHouse experience on hosted infrastructure might choose a managed ClickHouse like ClickHouse Cloud.

Those who want the performance of the ClickHouse database without needing to manage infrastructure, tune the database, or build other backend services for ingestion and APIs, might choose Tinybird.

Need more help deciding? Feel free to request a Tinybird demo or just sign up for a free Tinybird plan to give it a spin.

Do you like this post?

Related posts

Tinybird vs. ClickHouse®️: What's the difference?
Want a managed ClickHouse®️? Here are some options
Want a managed ClickHouse®️? Here are some options
Building an enterprise-grade real-time analytics platform
Real-time Databases: What developers need to know
Tinybird is out of beta and open to everyone
Migrating from Rockset? See how Tinybird features compare
More Data, More Apps: Improving data ingestion in Tinybird
We launched an open source ClickHouse Knowledge Base
Tinybird
Team
Oct 11, 2022
Tinybird connects with Confluent for real-time streaming analytics at scale
Tinybird
Team
Jul 18, 2023

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.