Frigade recently launched Trench!

Launch YC: Trench: Open Source Analytics Infrastructure 🌊

"Fast and scalable. No bloat. GDPR compliant. Powered by ClickHouse and Kafka."

Founded by Eric Brownrout & Christian Mathiesen

Hey everyone! Meet Christian and Eric from Frigade. Trench is open source analytics infrastructure for tracking events, identifying users, and querying data in real time.

It’s built on top of ClickHouse and Kafka for speed and scale, and it can be deployed with a single production-ready Docker image. Trench is a major part of Frigade’s infrastructure and powers their own in-product analytics and user targeting for millions of end users.

The code is MIT-licensed at https://github.com/frigadehq/trench. They just launched, and Trench gained over 1,000 GitHub stars ⭐ in less than a week.

Image Credits: Trench

Demo:

Check out the open source demo to see how to build your own version of a Google Analytics dashboard powered by Trench in less than 15 minutes.

https://demo.trench.dev/

Image Credits: Trench

🚨 The Problem: Postgres doesn't scale for tracking and querying millions of events at scale

As the founders scaled Frigade to millions of end users, the Postgres table they used for event tracking was quickly ballooning in cost and becoming a performance bottleneck. Many companies run into the same problem (e.g. Stripe, Heroku).

Engineers start by adding a basic events table to their relational database, which works at first, but breaks down as the user base scales. It's usually the biggest table in the database, the slowest one to query, and the longest one to back up. Postgres (or MySQL for that matter) simply isn't a good solution for tracking and querying events in real time at 1M+ end users scale.

The Solution: Fast, scalable, and affordable event tracking

The founders knew they wanted to move to technologies like Kafka and ClickHouse that are purpose-built for ingesting and querying thousands of events per second. When they looked for existing solutions, all the existing OSS projects found were either bloated with unnecessary features, UIs and spaghetti code, or simply antiquated. So Trench was built.

With Trench, the founders put together a single Docker image that provides a production-ready tracking event table that scales. When they migrated their tracking table from Postgres to Trench, they saw a 42% reduction in cost to serve on their primary Postgres cluster and eliminated all lag spikes from auto-scaling under high traffic. The founders are happy with how Trench has solved event tracking for them, and now they’re excited to share that with other teams.

Core Features

  • Compliant with the Segment tracking specifications
  • Can handle thousands of events per second on a single node
  • Query tracking data in real-time with read-after-write guarantees
  • Send data anywhere with throttled and batched webhooks
  • Single production-ready Docker image
  • Easily plugs into cloud-hosted ClickHouse/Kafka solutions

Use cases

What can you build with Trench? There are many use cases:

  1. Real-Time Monitoring and Alerting – Monitor your services and get alerts through tracking custom events like errors, usage spikes, or specific user actions, and send that data anywhere with webhooks.
  2. Event Replay and Debugging – Capture all user interactions in real time for event replay services.
  3. A/B Testing Platform – Capture events from different users and groups in real time. Segment users by querying in real time and serve the right experiences to the right users.
  4. Product Analytics for SaaS Applications – Embed Trench into your existing SaaS product to power user audit logs or tracking scripts on your end-users' websites.
  5. Build a custom RAG AI model – Easily query event data and give users answers in real time. LLMs are really good at writing SQL.

Learn More

🌐 Visit www.trench.dev to learn more.

⚡ Try it out and give Trench a star ⭐ . The founders hope you’ll find Trench useful if you’re facing or have ever experienced a similar problem with analytics at scale. Here are some links to get started:
Trench website, Quickstart guide, Github repo, and Product demo.

👣 Follow Frigade on
LinkedIn & X.

Posted 
December 2, 2024
 in 
Launch
 category
← Back to all posts  

Join Our Newsletter and Get the Latest
Posts to Your Inbox

No spam ever. Read our Privacy Policy
Thank you! Your submission has been received!
Oops! Something went wrong while submitting the form.