How Scarf Reduced ClickHouse® Costs by 60% to Enable Robust Growth

About Scarf
Scarf provides usage analytics for open source software. The company works with open source projects, foundations, and companies to help them understand how the world uses their software, tracking what open source code every company and government is running. To do that, Scarf ingests billions of interactions with open source software every single day, working directly with package registries to monitor the artifacts developers and devops tasks download.
The Starting Point
Scarf went through a typical path for successful startups:
- Get to market fast without spending too much time on cost.
- Once the system is in production, start to look for ways to optimize.
- Bring down costs to enable future growth.
- Grow!
This is the story of how Scarf and Altinity worked together to move from stage 3 into stage 4.
Growing Into a Database
Scarf started out running on Postgres, which worked well enough in the company’s earliest days. But as usage tracking scaled up, the team needed a true analytics database. Around 2022, Scarf evaluated several options and landed on ClickHouse even though, as founder and CEO Avi Press put it, “none of us knew anything about ClickHouse” at the time. It simply looked like the right fit.
To get there quickly and correctly, Scarf brought in Altinity from the start. “We had a lot of help and hand-holding really early on,” Press said, “from ‘How do we design our schema?’ to ‘How do we deploy and operate this stuff?'” That partnership gave Scarf’s engineering team a solid foundation and an ongoing resource. “What ended up happening a lot is I would see the engineers debating about something for too long, and I would just say, ‘Have you guys called Altinity yet?'”
Growing Out of a Budget
Scarf arrived at stage 3 when their data volume grew 200-300x in a relatively short period, driven by major new customers and partners coming onto the platform. Their business model often involves ingesting and monitoring large amounts of data before knowing exactly how much market demand that data has. That means infrastructure costs are frequently incurred before revenue starts to flow. Their ClickHouse infrastructure, originally architected for speed of deployment, suddenly had soaring, unsustainable costs. Something had to be done.
A Relationship, Not Just a Support Contract
Scarf and Altinity had already built a personal working relationship, including in-person meetings with Altinity CEO Robert Hodges. When costs became a business-critical issue, that relationship meant Scarf didn’t have to start from scratch to find help, they already had it.
The two CEOs met in person to work through the problem directly, focusing not just on the database but on Scarf’s underlying business goals. In the short term, Scarf needed to get costs under control; longer term, they needed an optimized architecture that set them up to handle robust growth going forward. Altinity’s team mobilized quickly and treated the effort with urgency. “We didn’t treat it any differently from a system down problem,” Hodges said. Within hours, Altinity engineers across time zones were on calls with Scarf’s team, working through a staged rollout onto an optimized cluster.
The Solution
Originally, Scarf was running Altinity.Cloud SaaS. The most important step was to migrate to the Bring Your Own Cloud (BYOC) deployment model. Running everything in their AWS account gave Scarf the flexibility to apply their own credits and discounts to cloud resources. The Altinity team also advised Scarf on ways to optimize their schema and queries, and rarely accessed historical data was moved to much cheaper object storage.
The path wasn’t entirely smooth; an early deployment attempt hit issues and had to be rolled back and retried, a stressful stretch where Scarf was briefly paying for duplicate infrastructure. But the team pushed through, and the redesigned setup has a stable, workable cost structure.
Growing Into the Future
With costs under control, Scarf is set to focus on growth. Three crucial things came together:
- Sustainable costs: Scarf brought its ClickHouse spend down to a steady, workable level after a period of rapid, cost-driven growth without sacrificing the performance the business depends on. Their TCO went down by 60%.
- A responsive partnership: When the issue became urgent, Altinity treated it like an outage, mobilizing engineers immediately rather than routing the problem through a slow support queue.
- Institutional knowledge: Early hands-on schema and deployment guidance from Altinity gave Scarf’s engineering team the confidence to operate and troubleshoot ClickHouse on their own, with expert help a call away when needed.
Looking Ahead
Scarf and Altinity continue to work together on cost efficiency as a standing priority rather than a one-time fix, including deeper collaboration on ClickHouse’s handling of object-storage-based deployments. And as Scarf continues to scale, they know the value their business delivers can grow in step with the infrastructure that powers it.
Want to reduce your ClickHouse costs?
Get practical strategies for optimizing ClickHouse performance and infrastructure spend.

ClickHouse® is a registered trademark of ClickHouse, Inc.; Altinity is not affiliated with or associated with ClickHouse, Inc.