Skip to main content

What Cloudflare Learned From 91,000 Internal Data Queries

· Do Minh Tuan · Business Hackers 🚀

What Cloudflare Learned From 91,000 Internal Data Queries

Cloudflare has described how it built Town Lake, an internal platform that pulls its business data into one place, and Skipper, an AI agent that sits on top and answers questions in plain English. Around 91,000 queries have gone through Skipper, and 53% of them were about billing.

That last number is the one I would put on a slide. Not because billing is glamorous, but because it says something honest about what people actually want from a data platform. The executives ask for strategy dashboards. Everyone else asks whether the invoice is right.

What Town Lake is for

Cloudflare runs a lot of systems. Billing, security, metrics, each producing data at a volume that makes a normal database unhappy. For years, that data lived in silos, which is the polite word for separate systems that do not talk to each other. Every question meant knowing which silo held the answer, then convincing someone with access to run a query.

A unified platform fixes the plumbing. Data lands in one storage layer, one query engine can read across it, and the tables have a shared definition so two teams do not compute revenue differently. That is the unglamorous core of the project, and it is most of the work.

The agent is the easy part to talk about

Skipper lets an employee type something like 'show me the security logs from yesterday' or 'how many accounts are pending billing' and get an answer. That is the demo everyone loves, and it is genuinely useful, because the alternative is a ticket to a data team and a two-day wait.

I am more interested in what it implies about the platform underneath. A natural-language agent is only as good as the tables it can see. If the definitions are inconsistent, the agent will produce confident answers that disagree with each other depending on how the question is phrased. The 91,000 queries are evidence that the platform is usable, not that the answers are correct.

That distinction matters if you are planning to copy this. The agent is the visible feature. The schema, the ownership and the definitions are the product.

The 53% is a business lesson

Billing questions dominating the list tells me finance data is where people most need quick answers, and I suspect smaller teams are no different. The finance-adjacent questions are the ones people ask most often, because they are the ones where a wrong answer costs money. How much did we bill. Why is this account suspended. Which invoices failed.

Most companies I know answer those questions by exporting a CSV and asking someone in finance. That works until it doesn't, usually during a pricing change or a month-end close. A single queryable source for billing events is worth more to a mid-size company than a prettier analytics dashboard.

If I were advising a founder, I would start there. Pick the three questions your finance team asks every week, make them answerable from one table, and only then think about an agent.

The stack has three pieces, and they are a common combination.

Trino is a query engine that reads from several systems at once without copying the data into one database first. You point it at different sources and it handles the join.

Apache Iceberg is a table format for files sitting in object storage. It keeps track of which files make up a table at a given moment, so readers get a consistent view even while new data is being written.

Cloudflare R2 is object storage, the place the files actually sit. The pitch is that it is cheap and does not charge the egress fees that usually make object storage expensive when you read a lot.

Together they form a lakehouse, which means object storage for the bulk data plus a table layer that makes it behave enough like a warehouse to query with SQL. The appeal is cost and flexibility. The cost is that you now own a data platform, with all the operational work that implies.

The temptation is to copy all three. I would not, or at least not first.

The transferable lesson is that events should be structured at the moment they are written. A billing event that arrives as a sentence in a log file is nearly useless six months later. The same event with a timestamp, a type, a user id, an amount and a status is queryable, joinable and safe to feed into a tool.

The pattern is a small helper that emits a JSON object with a timestamp, an event type, a nested set of fields and a human-readable description. The shape is the point: structured fields for machines, a description for people. I would add one thing. Decide the event names once and treat them as an API, because renaming an event six months in is how dashboards quietly break.

Then unify storage. If marketing, sales and billing live in three tools, you will spend your life reconciling numbers. A single Postgres instance with a few well-chosen tables beats a warehouse you cannot maintain. Move to object storage and a query engine when the volume actually demands it, not because Cloudflare did.

Where I get skeptical

The post gives query volume but not much else. Over what period were those 91,000 queries? How many people used the agent, and how often did they accept the answer versus run the SQL themselves? Those are the numbers that tell you whether an internal AI tool is working or just being tried.

I would also want to know how wrong answers were handled. An agent that confidently reports the wrong revenue figure is worse than a slow dashboard, because someone will act on it. Any team building this needs a way to show the query behind the answer, and a convention for marking tables the agent should not touch.

And there is a maintenance question. Natural-language interfaces over data are easy to demo and hard to keep accurate, because every schema change is a new way for the agent to misread the question. The platform work never stops.

Before anyone writes code, I would want answers to three things. Which questions will this replace, and who asks them today. Where the data comes from, and whether there is one definition of revenue everyone has signed off on. What the agent does when it does not know, and whether a user can see the SQL it generated.

If the answers are vague, build the warehouse first. The agent can wait.

The part of Cloudflare's story I find genuinely encouraging is the ordinariness of the top query. Even at a company operating at that scale, most of the demand is for a straight answer about money. That is true for a five-person startup in Hanoi as well, and it is a much cheaper problem to solve than the one the marketing suggests.

Written with AI assistance, reviewed and edited by Do Minh Tuan.