I've operated petabyte-scale ClickHouse clusters for 5 years
Posted by adastral 4 days ago
Comments
Comment by zbentley 23 hours ago
I think this was a benefit of DBA culture in previous eras. Not that the DBAs were specifically necessary to write good queries (often they'd need to work with application teams to guide them towards schemas/behavior that worked well) or to maintain the database (managed DB offerings obsolete a lot of this work), but because they functioned as gatekeepers and rate-limiters of what queries and schemas could exist.
In that mode, DBAs functioned a bit like a human/process version of a thin microservice wrapping database access functionality. A big benefit was that the rate of change of queries/schema changes/access patterns was controlled and had a higher probability of being reviewed and thought about by humans before it went live. This also resulted in an increased end-database-user culture of trying to make existing schemas/query patterns work before jumping straight to bespoke access patterns. That culture's not what you want as e.g. a startup or pro-rapid-big-refactors shop, but it is what you want when your DB reliability needs or query rate/dataset size are high.
I don't think it's a given that a gatekeeper team is worth the overhead and cost; that's situational. I do think that the code version of that team (aforementioned microservice that wraps DB accesses/schema changes and nothing else) is usually not worth the cost. In my experience, that pretty much always reduces reliability and free performance gains that come from using direct DB clients from user code.
Comment by bushbaba 23 hours ago
Comment by zbentley 23 hours ago
Scaling out DB compute can only help with that to a (expensive) point; eventually, you end up wanting to either prevent the bad queries from being added to the system (DBA culture) or ensure that the bad query runs on database infrastructure that doesn't affect other queries. That's why partitioning DB compute (and storage: noisy-neighbor effects from a bad query at the storage layer don't require storage to be running e.g. a BookKeeper or whatever on a server; they can manifest as hot S3 keys or cloud object/block store rate limiting) is a necessary capability if your plan for dealing with a culture of "anyone can add any access pattern they want" is to scale the DB.
Comment by jeremyjh 22 hours ago
I'm not saying there is no point of contention - depending upon your write patterns you have practical limits, but for reading data that is already stored you pretty much just pay more to do more and the rate of that cost is close to linear.
I'm sure there is a scale at which that pattern breaks, and I'm sure 99.9% of people reading this will never operate a system at that scale.
Comment by bushbaba 22 hours ago
It’s much less of an issue. Also, 99%+ of Aws customers likely don’t have enough QPS to hit the per prefix limits anyway
Comment by bigfatkitten 19 hours ago
Comment by 0xbadcafebee 12 hours ago
Comment by tmpz22 23 hours ago
And get this. We pay them the exact same.
Comment by zbentley 23 hours ago
But I won't follow you as far as "expecting developers to have expertise in how and where their software runs is unreasonable".
Like, yeah, it sucks that added DevOps responsibilities etc. don't come with adjusted compensation/time allocation expectations. I'm with you there.
But it's simultaneously true that a ton of "just regular developer" people are significant liabilities because they don't understand anything about the environment where their software runs. That liability manifests operationally (if someone's just running integration tests on Windows for their Java business logic changes and don't have any familiarity with e.g. the Linux, container, or cloud environments where their code runs, they're going to be useless when their code breaks in production and operations staff needs context), and it also makes them less effective when writing code--this culture of "developers should just live in business logic and not have to context-switch or fill their brains with other levels of the stack" is what leads to full table scans, lack of awareness of memory use, N+1 query hell, looping microservice dependencies, misunderstanding of what HTTP fields are set on requests that are mutated by load balancers, mistaken assumptions about how many instances of code can run and what concurrency/thread/coroutine behaviors are present, and so on. Those are very common problems, and it's incumbent on developers in every specialty to gain familiarity with how and where their code runs in order to write and maintain that code effectively.
If your code runs on Linux in Kubernetes, all of your developers should know how to read Linux system logs, check database sessions/queries issued by parts of the application, ls/grep/cat/strace/ps their way around, interpret k8s/application dashboards, check application logs both in log storage and as they're emitted from a process, exec into a container, restart pods, check deployment liveness, etc. Even if they don't have permission to do those things in production.
That was true in 2005 when they deployed their code to IIS on Windows Server/MSSQL, too--just with different operational specifics.
That's a low bar that's often unmet, and all sorts of teams suffer from that failure. Those skills can be trained, kept up to date, and hired for; I don't think there's a great excuse for not expecting them.
Comment by kentm 21 hours ago
In my professional experience, management tends to treat this as a dichotomy rather than a range. And its lead to situations where we're choosing to route every decision through a small number of 'experts' and expecting that to scale, or have people make very bad decisions about things like indices, data layout, etc.
I align with you on this. If you are using some sort of system, there is a sort-of minimum bar of expertise one should acquire. When using analytical platforms, having a basic understanding of how data is stored and the levers it gives you to optimize data processing should be standard.
Some examples:
MySQL - I would expect developers to be able to come up with a list of columns to index and why, understand why UUIDv4 is a bad choice for primary keys, know how to write performant SQL by hand and understand when their ORM is going to do the wrong thing, etc.
Redshift - Understand dist and sort keys and have some mental models on how data shuffles and is pruned based on each choice.
Iceberg + Spark/Trino - Understand that data tends to be stored/loaded as batch files. Understand how deletes work. Understand partitions and sort as options. Understand generally how bloom filters work and when you should decide to place a bloom filter. Understand why UUIDv7 is better than UUIDv4 when its part of a partition key.
Comment by tmpz22 23 hours ago
What I'm calling out practically is a de-specialization in roles and the trade-offs it imposes.
For example, the "jack of all trades master of one" that was already propagating under the guise of "Full stack engineer" or "DevOps" is further exasperated when those consolidated roles are also delegating critical knowledge acquisition to LLMs.
Further, as we consolidate roles and delegate knowledge acquisition to llms, we're also paying people less, giving less job security, lowering the general quality of life not just for developers, but for operations staff and users, and generally promoting total consolidation within big tech.
Comment by zbentley 23 hours ago
I wanna re-emphasize that this is not a new problem. It's not because of DevOps culture or cloud complexity or scale or whatever. Very limited-specialty people were always operational liabilities and had limited positive impact on feature delivery once you accounted for the help they needed to do anything that spanned multiple levels of the stack. There are just more engineers working on more systems with tighter timeline expectations now, so it seems like the complexity incumbent on the engineering role went up in general. It didn't (it went up in some situations and down in some situations), we just started noticing operational pain more often.
I definitely do agree that there's widespread ignorance of the velocity and difficulty-of-work tradeoffs that arise from requiring a wider range of specialties from engineers, and a similarly widespread failure to adjust compensation and timeline expectations accordingly.
Comment by cogman10 21 hours ago
Our DBAs are the first line of defense when a DB starts to struggle. They crack the database open, see what's going on, and troubleshoot and sometimes fix the problems. If it's just a simple stored proc change or table change, our DBAs are empowered to go in and fix them. If there's a code change needed, they work with the devs to fix the code.
But by and large the devs still write most of the queries and tables. We as devs get DB training, but we also have a very open door policy with the DBAs so the devs can lean on their expertise and ask advice before sending stuff out. Our devs get a much better sense of "This seems like it could be expensive, let's talk to the DBAs and see what they'd suggest".
It's worked great.
I think any company would benefit from this sort of subject matter expert employment.
Comment by nostrademons 21 hours ago
I've never seen a DevOps role in Big Tech (I've ping-ponged back and forth between the startup and FANG worlds a few times), and usually a full-stack engineer is someone very senior who designed a lot of the product when it was young and stuck with it for a decade. Instead there's usually a clear SRE/SWE split, and hyper-specialization, enough that someone might actually become the expert on one particular screen of a mobile app.
If you're frustrated with the de-specialization of roles, it's entirely possible you're working at companies at the wrong stage of their lifecycle. Move to a big company and the struggle is to avoid becoming pigeon-holed into one very specific task (and then laid off when the structure of the product changes so that task is no longer necessary). Such a career change can be challenging at first because your career can get specialized to "working for startups and early growth companies", and then big companies won't even look at your resume. But if you try enough places and say in the interview that you're looking for a place where you can really specialize and develop expertise, you can often find a manager desperate enough to take a chance.
LLMs are another issue. I'm worried that they're going to make the economy very unstable because the whole reason a firm exists is to capture institutional knowledge and the LLM captures that institutional knowledge in the model, where a.) it's not specific to a differentiated business and b.) it's subject to model-collapse issues. Could easily see the whole technological world collapse through lack of expertise, but if that happens it's a bigger problem that you can only fix by developing the expertise yourself.
Comment by 9dev 17 hours ago
How would you suggest to approach such a career change successfully?
Comment by mawadev 21 hours ago
Comment by Foobar8568 21 hours ago
Oh and you will do also business analysis with the business as claude is too complex for them (read any version of the nocode initiative).
Comment by neya 21 hours ago
Why are you complaining? You should be grateful of the learning opportunity not everyone gets to have. Sure, we pay you peanuts for it. But, it's ultimately for your own good. Don't mind my yacht and Ferrari, though.
Comment by PunchyHamster 18 hours ago
Managers went happy coz now they don't need to have hire sysadmins, while in reality they hire sysadmins, call them devops, and have them know some programming on the side.
And the "savings" from not having onprem infrastructure are burned on expensive cloud and debugging cloud blackboxes
Comment by FLeXMurphy 22 hours ago
Comment by throwaway894345 23 hours ago
Comment by chasd00 23 hours ago
Comment by WarcrimeActual 23 hours ago
Maybe I'm old, and I am, but I just can't get past this point with such annoying writing. Like if you actually spoke like this people would hate you.
Comment by pstuart 13 hours ago
Disclaimer: I've never managed a ClickHouse cluster, let alone one of this size.
Comment by winrid 12 hours ago
Comment by AaronNewcomer 1 hour ago
I initially tried tinybird out just to rule out clickhouse as an option for my workload when I was planning on going with Apache Druid but then found out for my workloads they blew it out of the water.
So I definitely recommend them and the whole clickhouse ecosystem in general for any kind of high throughput read and write analytics work.
Comment by walthamstow 1 day ago
Comment by lucrbvi 1 day ago
Comment by HatchedLake721 23 hours ago
Comment by gcharbonnier 21 hours ago
EDIT: I'm wrong, their home page clearly states: "Ship fast over a Managed ClickHouse®", though I don't really understand the difference between a managed clickhouse and clickhouse hosting...
Comment by beberlei 9 hours ago
Comment by doe88 23 hours ago
Comment by mritchie712 19 hours ago
Yeah, it sucks they need to do this. If I was a visitor to their website, I'd immediately want to know what ClickHouse, Inc. is and you'd realize ---> it's managed clickhouse, direct competitor... why would I use the one that needs all the ®'s
Comment by fusl 8 hours ago
Comment by bradleyy 1 day ago
Comment by andriy_koval 1 day ago
Comment by bradleyy 23 hours ago
Comment by justincormack 4 hours ago
Comment by bradleyy 35 minutes ago
Comment by bijowo1676 17 hours ago
Comment by viccis 8 hours ago
Comment by sdairs 19 hours ago
Comment by kentm 19 hours ago
Comment by fidotron 23 hours ago
What I saw of it, especially some years ago, was it was highly particular, and everyone had their own odd habits built around running it, ingestion, querying, everything, to the point I suspect there are a non trivial number of companies using it where it is actually the core operational expertise of the company, despite them all appearing to be in totally different domains.
Comment by f311a 23 hours ago
But given the majority of use-cases of CH, AWS can be quite expensive.
Comment by hodgesrm 22 hours ago
Disclosure: My company Altinity offers BYOC management of ClickHouse.
Comment by anguss 20 hours ago
Comment by ggcr 2 hours ago
> Every day CI runs about 20..80 million tests in 600 commits and 300 pull requests
> Last year, ClickHouse spent 360 years of machine time for CI
I am no user of CH so I can't talk about their product. But we are talking about a company with 686 employees as per their LinkedIn, where ClickHouse is clearly the core of their business. Considering all of this, is 50+ commits a day that much?
[1] https://presentations.clickhouse.com/2026-openhouse-sf/great...
Comment by ryan_lane 16 hours ago
Clickhouse has a managed SaaS and it's their primary product. They have a lot of engineers. They're going to do a lot of commits.
Comment by threecheese 23 hours ago
But seriously Clickhouse does love disk space.
Comment by cnkk 22 hours ago
Comment by yakkomajuri 23 hours ago
Very true. Reading about "too many parts" gave me flashbacks.
(previously owned ingestion into CH at PostHog, no longer)
Comment by fuziontech 21 hours ago
:oof-1: CH needs more disk to keep up with merges.
We ran CH way too lean in those days.
Comment by yakkomajuri 15 hours ago
Comment by wackget 13 hours ago
It's difficult (for my bird brain, at least) to imagine a scenario where such volume of analytics data would ever be necessary.
Comment by razes 8 hours ago
In fact, they have solutions teams to check with the clients what they are storing and what they really need to store, how to consume it, etc.
Comment by x0x0 13 hours ago
The reason to store that data is to be able to build analytics and funnels you didn't anticipate and construct them retrospectively. You can of course save massive amounts of storage by building rollups and aggregating, but that prevents you from being able to eg change the funnels and see the funnel in the past.
10M users × 100 events/day × 1KB ≈ 1TB/day. A couple years gets you into PB range.
The other obvious thing is logs. Being able to have a vulnerability then go back in time and see if you were exploited is super valuable. See eg log4shell: if you kept records, you probably could go back and see if you'd been exploited.
Comment by mrngm 23 hours ago
(note: the first part was originally published April 2025 according to the date tooltip)
Comment by dev_l1x_be 19 hours ago
Comment by a34729t 16 hours ago
Comment by dev_l1x_be 5 hours ago
Comment by pjot 15 hours ago
Comment by Perepiska 17 hours ago
1. https://github.com/ClickHouse/ClickHouse/issues/49383#issuec...
Comment by swyx 11 hours ago
grep for "they don't like it" and click on that link
Comment by Lucasoato 23 hours ago
Comment by a34729t 14 hours ago
Trino is a federated query engine and lacks secondary indices, but can do all sorts of big scale stuff like distributed merge sort and spool to disk. The typical use case is querying your data lake (say Iceberg or Hive catalog with a bunch of Parquet format files in S3, and a separate ingestion system). It is extremely mature and well understood with lots of extensions.
ClickHouse, Pinot, StarRocks, and Druid are full on OLAP datastores that can handle varying rates of ingestion (Druid is by far the slowest, the rest are fast like 100kqps writes per table is nothing fast). ClickHouse is the most used but sucks at joins and stateful data. Druid, Pinot and StarRocks can do joins and handle stateful data. In my experience Druid is the worst, Pinot is relatively immature and has minimal industry traction, and StarRocks is the most mature and has lots of traction, both in China and in ethnic Chinese analytics teams in US companies. They can all support high qps for trivial queries (thousands of simple queries in tens of ms, given enough hardware), but depending on data partitioning it can get slow quick handling a bunch of concurrent queries that are scanning the same physical servers. But people have PostGres vertically scaled to 100kqps plus and 100+TB too. In principle the use case is dashboards and charts for your real time UI; tier down to S3 with Trino for more flexible, bigger queries.
The cool thing about all these systems (the fast OLAP) systems is that they are all converging with Trino where they are moving their storage layer to object storage, which is way more flexible. No more hot storage nodes, and infinite storage. And then use Paimon or Iceberg v3 as your data lake and you get near real time stateful storage.
ElasticSearch is amazing but is really optimized for full text search and aggregations, and while it can scale to huge sizes, it does not give you joins and forces you into a very particular approach to materialized views. Also, not columnar... and nested documented dont scale well in my experience.
Spark on the other hand is just your old batch compute framework at this point. It is very flexible, and you are writing a series of SQLish transformations, but for many simpler use cases Trino is much faster and easier to use. Way bigger learning curve than just writing SQL and hoping your query engine has a good optimizer!
Comment by hodgesrm 22 hours ago
Comment by antoniojtorres 23 hours ago
Comment by AtNightWeCode 21 hours ago
It is very easy to ingest data into CH. We connected exchange topics and it just worked with zero code.
But the thing with CH is that it is pretty much a Russian product so you should not use it for production anymore.
Comment by AntonFriberg 21 hours ago
After the invasion of Ukraine they stayed silent for a while but that was because they needed to allow there developers to get out of Russia. Many of them are Ukrainians including the CTO and founder. As soon as it was safe for there team they took a very firm stance against Russia with Ukrainian flags on the website and written statement from the team.
I am not aware of any Russian influence currently.
Comment by AtNightWeCode 20 hours ago
Comment by lstodd 17 hours ago
Comment by Lucasoato 20 hours ago
Comment by trynotsober 23 hours ago
Comment by lee_ars 19 hours ago
Comment by javisantana 4 hours ago
Comment by solatic 21 hours ago
> A quick note about HTTP: ClickHouse® offers a TCP connector with a native protocol, but we don't use it. It does not offer many advantages for the type of application we build
This needs more elaboration. One of the major goals of running a ClickHouse cluster is to provide low-latency queries; a persistent TCP connection removes the need to re-establish a new connection for each query and thus reduces overall latency in line with CH goals. So I really didn't understand this.
> ClickHouse® open source faces a significant challenge: limited support for cloud storage. Modern OLAP databases and data systems should leverage cloud storage for cost efficiency and independent scaling of compute and storage resources. Snowflake established this standard over a decade ago, and ClickHouse® (open source) lags behind
ClickHouse writing to NVMEs is exactly how they provide their latency and performance advtanges. Writing and reading to object buckets is fundamentally slower with multiple network hops to reach what is, in this architectural context, a storage server for your storage server. If you really need far more storage, and are willing to sacrifice query latency to get it... why not architect for one of the OLAP databases, like Snowflake, where that was part of their architecture from day one?
> Because you are testing your analytics queries, right?
No? Half the point of an OLAP database is to let users write their own queries. If we knew the queries ahead of time, we probably wouldn't need an OLAP database, and instead use a less-flexible streaming architecture storing intermediate calculations so as not to need to pay for petabyte-scale storage. The expected value from paying for all of that storage is to support not knowing which queries will be written by users.
> Every single company handling ClickHouse® struggles with ingestion... Backpressure mechanism: Some people put Kafka before ClickHouse®. This does the job
The whole trade-off that you make with column-store databases like ClickHouse (instead of row-store databases like Postgres) is that inserts are slow for column stores (whereas they are fast for row stores). Inserts happen slowly, asynchronously, in the background. It is the price you pay for fast analytics queries. This is why OLAP databases have a latency lag and do not show real-time results. This is why stores like Kafka are usually a good fit, you let Kafka hold onto new data until batch insertions can catch up. If you do need real-time queries, you don't write to an OLAP directly; you write to a stateful frontend that answers the query itself, then streams out historical data from the OLAP that was successfully written there. And the first thing you do in a "I want to have my cake, and eat it too, and yes I'm willing to pay for the privilege" architecture like that is... to keep the persistent TCP connections, because that's really low-hanging fruit.
Comment by eclbg 10 hours ago
Comment by solatic 24 minutes ago
https://clickhouse.com/docs/concepts/features/interfaces/htt...
If you throw something like nginx in front to try to better guarantee the "balance" part of load balancing, as an improvement over TCP connections that are sticky to the initial server they reach, then you're asking different CH servers to handle the same original session. So what did the load balancer give you?
Now, CH added session-aware routing for the HTTP client... but it's a beta feature, and it requires an Enterprise license anyway: https://clickhouse.com/docs/products/cloud/features/infrastr...
Why go against the tide?
Comment by will_pseudonym 22 hours ago
Comment by alexnewman 17 hours ago
Comment by halilBB 6 hours ago
Comment by shin_lao 16 hours ago
Comment by boringstack 9 hours ago
Comment by 8943gG4f 23 hours ago
Comment by nicechianti 23 hours ago
Comment by wackget 13 hours ago
- Uncaught TypeError: navigator.sendBeacon is not a function
- Uncaught (in promise) ReferenceError: WebAssembly is not defined
Not sure why a blog entry needs WebAssembly but I'll give it a pass.
Comment by phoghed 13 hours ago