TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

Launch HN: OpenMeter (YC W23) – Real-Time, Open Source Usage Metering

174 点作者 hekike将近 2 年前
Hi HN! I’m Peter, the co-founder of OpenMeter (<a href="http:&#x2F;&#x2F;openmeter.io">http:&#x2F;&#x2F;openmeter.io</a>). We are building an open-source project to help engineers to meter and attribute AI and compute usage for billing and analytics use cases. Our GitHub is at <a href="https:&#x2F;&#x2F;github.com&#x2F;openmeterio&#x2F;openmeter">https:&#x2F;&#x2F;github.com&#x2F;openmeterio&#x2F;openmeter</a>, and there’s a demo video here: <a href="https:&#x2F;&#x2F;www.loom.com&#x2F;share&#x2F;bc1cfa1b7ed94e65bd3a82f9f0334d04" rel="nofollow noreferrer">https:&#x2F;&#x2F;www.loom.com&#x2F;share&#x2F;bc1cfa1b7ed94e65bd3a82f9f0334d04</a>.<p>Why? Companies are increasingly adopting usage-based pricing models, requiring accurate metering. In addition, many SaaS products are expected to offer AI capabilities. To effectively cover costs and stay profitable, these companies must meter AI usage and attribute it to their customers.<p>When I worked at Stripe, my job was to price and attribute database usage to product teams. You can think about it like internal usage-based pricing to keep teams accountable and the business in the margins. This was when I realized that it’s challenging to extract usage data from various cloud infrastructure components (execution time, bytes stored, query complexity, backup size, etc.), meter it accurately, and handle failure scenarios like backfills and meter resets. I was frustrated that no standard exists to meter cloud infrastructure, and we had to do this on our own.<p>Usage metering requires accurately processing large volumes of events in real-time to power billing use cases and modern data-intensive applications. Imagine you want to meter and bill workload execution on a per-second granularity or meter the number of API calls you make to a third party and act instantly on events like a user hitting a billing threshold. The real-time aspect requires instant aggregations and queries; scalability means to able to ingest and process millions of usage events per second; it must be accurate—billing requires precise metering; and it must be fault tolerant, with built-in idempotency, event backfills, and meter resets.<p>This is challenging to build out, and the obvious approaches don’t work well: writing to a database for each usage event is expensive; monitoring systems are cheaper but inaccurate and lack idempotency (distributed systems use at-least-once delivery); batch processing in the data warehouse has unacceptable latency.<p>Companies also need to extract usage data from cloud infrastructure (Kubernetes, AWS, etc.), vendors (OpenAI, Twilio, etc.), and hardware components to attribute metered usage to their customers. Collecting usage in many cases requires writing custom code like measuring execution duration, listening to lifecycle events, scraping APIs periodically, parsing log streams, and attributing usage of shared and multi-tenant resources.<p>OpenMeter leverages stream processing to be able to update meters in real-time while processing large volumes of events simultaneously. The core is written in Go and uses the CloudEvents format to describe usage, Kafka to ingest events, and ksqlDB to dedupe and aggregate meters. We are also working on a Postgres sink for long-term storage. Check out our GitHub to learn more: <a href="https:&#x2F;&#x2F;github.com&#x2F;openmeterio&#x2F;openmeter">https:&#x2F;&#x2F;github.com&#x2F;openmeterio&#x2F;openmeter</a><p>Other companies in the usage-based billing space are focused on payments and basically want to be Stripe replacements. With OpenMeter, we’re focusing instead on the engineering challenge of collecting usage data from cloud infrastructure and balancing tradeoffs between cost, scale, accuracy, and staleness. We’re not trying to be a payment platform—rather, we want to empower engineers to provide fresh and accurate usage data to Product, Sales, and Finance, helping them with billing, analytics, and revenue use cases.<p>We’re building OpenMeter as an open-source project (Apache 2.0), with the goal of making it the standard to collect and share usage across many solutions and providers. In the future, we’ll offer a hosted &#x2F; cloud version of OpenMeter with high availability guarantees and easy integrations to payment, CRM, and analytics solutions.<p>What usage metering issues or experiences do you have? We would love to hear your feedback on OpenMeter and to learn from which sources you need to extract usage and how the metered data is leveraged. Looking forward to your comments!

16 条评论

mrkurt将近 2 年前
We&#x27;re neck deep in figuring out usage based billing for Fly.io. What we&#x27;re doing is pretty extreme, and may not be representative of many other people, but it feels like no one&#x27;s really solved this in a way that makes sense for us.<p>We run millions of tiny VMs. Each gets billed on a number of dimensions: egress, runtime (per cpu &#x2F; memory combo), storage &#x2F; io. We also have other metered services: ssl certificates, IP addresses, etc.<p>The thing is, we _already_ have metrics for everything we want to bill. They&#x27;re in a time series DB (VictoriaMetrics, in this case). Sending a shit ton of events to yet-another-system is complicated and brittle.<p>Your k8s pods example is a good source of my hives. Anything that runs on a timer to fire off events is going to get bogged down and lose data at our scale. And we&#x27;re not very big!<p>This is a somewhat solved problem for metrics stacks. It&#x27;s relatively straightforward to scale metrics scrapes. And once we have that infra, it&#x27;s pretty easy to just start pushing &quot;events&quot; to it when events become useful. We don&#x27;t end up needing Kafka and its complexity.<p>My dream for billing is: a query layer on top of a time series database that takes data I already have and turns it into invoices.<p>One thing about your post that struck me – the last mile to billing and reporting is the thing we&#x27;re most interesting in buying. It&#x27;s less specialized. There also aren&#x27;t any products out there that have really figured this out, I don&#x27;t think (we&#x27;ve evaluated pretty much all of them).<p>Usage tracking and reporting is a thing we&#x27;re ok building, because it&#x27;s core to our product.
评论 #36433504 未加载
评论 #36433615 未加载
评论 #36445937 未加载
评论 #36433917 未加载
评论 #36445363 未加载
评论 #36442572 未加载
评论 #36441785 未加载
评论 #36438740 未加载
评论 #36436889 未加载
mlhpdx将近 2 年前
I’m building a service billed for via usage. As others have pointed out, I have to solve metering for a variety of reasons (beyond billing) and won’t take an external dependency for it. It’s a nonstarter, metering is just too central.<p>Also, any invoice system that’s based on query-time aggregation is probably too expensive and definitely a risk. Fees are accumulated in real time, incrementally - not when I generate an invoice.<p>But probably the biggest miss I encounter is around auditing. Customers dispute bills, and always will to some degree. The process of resolving those disputes needs to be automatic, clear and understandable, and based on something that the customer can cross check (ideally).
eob将近 2 年前
+1 to this from the Steamship perspective.<p>We&#x27;re a hosting platform for AI Agents and in practice that means keeping track of a stream of usage events across agents, microservices (equivalent of Fly&#x27;s VMs), and third-party services (OpenAI, Eleven Labs, D-ID, Pinecone, Replicated, etc) that roll up into an itemized consumption bill.<p>It might be this is just a super-niche billing situation, but we also haven&#x27;t yet found an open-source solution that fits. Fully agree that a query layer atop a time-series database is the style of product that we&#x27;re craving.<p>Metronome comes very close, but since it&#x27;s not open source we&#x27;re hesitant to make the jump before it&#x27;s a perfect fit.<p>Congrats on the launch! It looks very cool!
mirchiseth将近 2 年前
At the risk of sounding old - this is called mediation part of the usage based billing in the Telecom&#x2F;Utility billing, which happen to be the OG of usage based billing with millions of record. I have worked with Digital Route for this in the past. Definitely good to see newer architectures and thinking applied to this problem for newer use cases. Godspeed to OpenMeter.
runlevel1将近 2 年前
Metering is such a PIA to implement properly, and the cost of getting it wrong is super steep: Lost revenue or, worse, overbilling. Love the idea of this project, and I&#x27;m liking what I see so far!
评论 #36432309 未加载
hekike将近 2 年前
You can find the architecture diagram here: <a href="https:&#x2F;&#x2F;openmeter.io&#x2F;docs">https:&#x2F;&#x2F;openmeter.io&#x2F;docs</a> Decisions: <a href="https:&#x2F;&#x2F;github.com&#x2F;openmeterio&#x2F;openmeter&#x2F;tree&#x2F;main&#x2F;docs&#x2F;decisions">https:&#x2F;&#x2F;github.com&#x2F;openmeterio&#x2F;openmeter&#x2F;tree&#x2F;main&#x2F;docs&#x2F;deci...</a>
jeffchao将近 2 年前
For these things I look for flexibility, i.e., from the user perspective, control. That&#x27;s the nice thing about OSS vs closed source here.<p>I don&#x27;t necessarily want to send data to another SaaS vendor&#x27;s data lake&#x2F;warehouse&#x2F;tsdb&#x2F;etc. Egress costs, privacy, and storage costs. Also if I already have a data platform, I don&#x27;t want 2.
lharries将近 2 年前
Congrats on the launch! If I understand it right you’re interested in collecting this usage data both to bill external clients but also to much more granularly understand the infra costs of a particular feature&#x2F;product&#x2F;team? Very cool. Do you have any good examples of the internal usage one? How much do big companies actually care about this?
评论 #36442757 未加载
debarshri将近 2 年前
Slightly distracting question and because I am very curious. Why did you decide to opensource the project? What is the benefit that you get in your GTM by opensourcing your project. Don&#x27;t you think it is a bit more of a headache to create and manage a community around the project. Document, manage external user changes etc.
评论 #36439061 未加载
ygouzerh将近 2 年前
Notes: Something that I always says in my engineering team: I will encourage you to fully leverage SemVer for the versioning of the product and use the major for the major public releases &#x2F; breaking changes.<p>In this way, it will enable you to be able to fully use the minor number and the patch number when you will need them.
mercurialsolo将近 2 年前
I would love to see a wrapper around all API calls which is metered by default. Showing usage and meters which you can set at a per-integration level, per-user, per-key, per-function level.<p>Congrats on launching this, there&#x27;s lots of ways to deal with this, but would love a metering standard much like we have one around tracing.
评论 #36432792 未加载
methodical将近 2 年前
This isn&#x27;t a ding against the product or idea and is likely something you&#x27;re looking to improve in the long term, but the graphics on the marketing site just feel like visual sugar and don&#x27;t convey any information. This may be just me but I frequently just go through a marketing site&#x27;s graphics as a way to grasp high level details of the company and product, but the graphics on your marketing site feel like random geometrical placeholder images with different layouts, as opposed to anything that actually complements the information written in text next to them. Again, this is a minor gripe, and something that probably was already going to be addressed long term. The product sounds interesting and I look forward to taking a deeper dive into the open source side of it later!
评论 #36439740 未加载
nylonstrung将近 2 年前
What does this do that cannot be accomplished with the other YC open source billing tools– Lago and lotus
评论 #36436473 未加载
ygouzerh将近 2 年前
Your UI is very nice, are you using a special CSS framework ?
评论 #36445976 未加载
villgax将近 2 年前
Awesome work, looking try this out!
that_guy_iain将近 2 年前
Your discord link is invalid. &quot;undefined&quot; I assume is from a JS error.
评论 #36432086 未加载