Tr

Trench – Open-source analytics infrastructure

Hacker News

Trench – Open-source analytics infrastructure

Hey HN! I want to share a new open source project I've been working on called Trench ( https://trench.dev ). It's open source analytics infrastructure for tracking events, page views, and identifying users, and it's built on top of ClickHouse and Kafka. https://github.com/frigadehq/trench I built Trench because the Postgres table we used for tracking events at our startup ( http://frigade.com/ ) was getting expensive and becoming a performance bottleneck as we scaled to millions of end users. Many companies run into the same problem as us (e.g. Stripe, Heroku: https://brandur.org/fragments/events ). They often start by adding a basic events table to their relational database, which works at first, but can become an issue as the application scales. It’s usually the biggest table in the database, the slowest one to query, and the longest one to back up. With Trench, we’ve put together a single Docker image that gives you a production-ready tracking event table built for scale and speed. When we migrated our tracking table from Postgres to Trench, we saw a 42% reduction in cost to serve on our primary Postgres cluster and all lag spikes from autoscaling under high traffic were eliminated. Here are some of the core features: * Fully compliant with the Segment tracking spec e.g. track(), identify(), group(), etc. * 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. No need to manage and roll your own Kafka/ClickHouse/Nodejs/etc. * Easily plugs into any cloud hosted ClickHouse and Kafka solutions e.g. ClickHouse Cloud, Confluent Trench can be used for a range of use cases. Here are some possibilities: 1. Real-Time Monitoring and Alerting: Set up real-time alerts and monitoring for your services by tracking custom events like errors, usage spikes, or specific user actions and sending that data anywhere with Trench’s webhooks 2. Event Replay and Debugging: Capture all user interactions in real-time for event replay 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 model: Easily query event data and give users answers in real-time. LLMs are really good at writing SQL The project is open-source and MIT-licensed. If there’s interest, we’re thinking about adding support for Elastic Search, direct data integrations (e.g. Redshift, S3, etc.), and an admin interface for creating queries, webhooks, etc. Have you experienced the same issues with your events tables? I'd love to hear what HN thinks about the project.

Share card

Actual performance

155points
38comments
Made the leaderboard

Launch Intel predictions

Analyze your own launch →
Product HuntOn track for Day 1 leaderboard · Strong signals: model, user, stripe · Missing: mac, agents, macos
97%97% predicted probability of success on Product Hunt, based on ML models trained on real launch data.
best fitHighest predicted score across all platforms for this description.
Indie HackersFits the IH revenue-focused audience · Missing: supports, reddit linkedin, podcasting
94%94% predicted probability of success on Indie Hackers, based on ML models trained on real launch data.
Hacker NewsStrong engagement from HN community · Strong signals: exist, open source, existing · Missing: https docs, excited, just released
74%74% predicted probability of success on Hacker News, based on ML models trained on real launch data.
nativeThis product was originally launched on this platform.
TrustMRRLess likely to generate early MRR · Strong signals: answers, users · Missing: mobile apps, ios, personal
44%44% predicted probability of success on TrustMRR, based on ML models trained on real launch data.
AppSumoMay struggle as an AppSumo deal · Strong signals: platform, host, interface · Missing: plus, intuitive, reviews
26%26% predicted probability of success on AppSumo, based on ML models trained on real launch data.
Acquire.comPre-revenue stage for this audience · Strong signals: saas · Missing: arr, mrr, revenue
12%12% predicted probability of success on Acquire.com, based on ML models trained on real launch data.
BetaListMay not resonate with beta-testers · Strong signals: real time · Missing: web3, chat, crypto
0%0% predicted probability of success on BetaList, based on ML models trained on real launch data.

Correct prediction on native model

Similar products

Trench
Trench79%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

Open source analytics infrastructure

Product Hunt+281Developer Tools
Ob
Objectiv – Open-source product analytics infrastructure68%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

Objectiv – Open-source product analytics infrastructure

Hacker News88
Ki
Kitaru – Open-source infrastructure for async agents60%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

Kitaru – Open-source infrastructure for async agents

Hacker News2
Yo
Yor, an open-source tool for infrastructure-as-code tagging and tracing58%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

Yor, an open-source tool for infrastructure-as-code tagging and tracing

Hacker News3
Pi
Pirsch Analytics - Open-source analytics for developers69%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

Pirsch Analytics - Open-source analytics for developers

Hacker News4
Op
Open-Source,The underlying infrastructure of our profitable API Market66%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

Open-Source,The underlying infrastructure of our profitable API Market

Hacker News2
An
An open-source notification infrastructure58%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

An open-source notification infrastructure

Hacker News170
Ku
Kumbukum, open source memory infrastructure for teams47%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

Kumbukum, open source memory infrastructure for teams

Hacker News1
Th
The first open-source Infrastructure-as-Code framework83%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

The first open-source Infrastructure-as-Code framework

Hacker News18
Op
Open-Source Infrastructure for AI Code Interpreters52%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

Open-Source Infrastructure for AI Code Interpreters

Hacker News6