latest news

in this website, we will provide you all new latest news

  • Home
  • Business
    • Internet
    • Market
    • Stock
  • Parent Category
    • Child Category 1
      • Sub Child Category 1
      • Sub Child Category 2
      • Sub Child Category 3
    • Child Category 2
    • Child Category 3
    • Child Category 4
  • Featured
  • Health
    • Childcare
    • Doctors
  • Home
  • Business
    • Internet
    • Market
    • Stock
  • Downloads
    • Dvd
    • Games
    • Software
      • Office
  • Parent Category
    • Child Category 1
      • Sub Child Category 1
      • Sub Child Category 2
      • Sub Child Category 3
    • Child Category 2
    • Child Category 3
    • Child Category 4
  • Featured
  • Health
    • Childcare
    • Doctors
  • Uncategorized

Thursday, 23 July 2026

New top story on Hacker News: Show HN: Trifle – Open-source analytics that stores answers, not events

 Champ     12:21     Hacker News     No comments   

Show HN: Trifle – Open-source analytics that stores answers, not events
7 by iluzone | 0 comments on Hacker News.
Trifle is an open-source time-series analytics library that aggregates nested counters instead of storing raw events. All in the database you already have. After rebuilding it twice over 10 years, it now tracks ~1B events a day at my day job. It started in 2015 as my own Rails APM. I plugged into ActiveSupport::Notifications, got a few small users, and one bigger one whose scraping app broke everything. That sparked the core idea: aggregate counters into pre-defined time buckets, so a single write increments multiple buckets at once. The APM eventually faded away without much traction. Later in 2021 I needed analytics at my day job. Instead of going for something out there I revised the idea of Trifle as a more generic analytics library, borrowing some data warehouse ideas. First used Redis, then Postgres, eventually MongoDB. Hence why Trifle::Stats comes with multiple drivers that keep the DSL unified while storage layer changes with your needs. In our case (huge write volume, some reads) PG read faster but slowed on large writes. The nested values are the whole trick here. Single: Trifle::Stats.track( key: 'requests::aws::s3_uploads', values: { count: 1, status: { request.response_code => 1 }, size: payload.bytes, duration: { sum: request.duration, count: 1 } } ) builds up counts for requests, success rate, result status codes, duration for multiple time buckets at once. Single bucket from 2am then looks like: { count: 14, status: { 200: 12, 500: 2 }, size: 5628341, duration: { sum: 43, count: 14 } } If request.duration is in seconds, then sum stored under duration would be in seconds as well. Success rate is never stored, but it is calculated by dividing 200s over total number of requests. Same with average duration: sum over count. You ask for a metrics key, granularity and timeframe and you get back aggregated values at each point. Ready for charts or to answer "Average response time over last 30 days". There's a Series wrapper for aggregating and formatting values for charts in a simple call. And as building dashboards is not as much fun for other devs as I thought, I built Trifle App - a visual layer with dashboards, scheduled digests and alerts. It's written in Elixir, so I ported the library to Elixir too. And later to Go for a CLI. All three are compatible, write in one and read in another. Today we track activity from over 100M background jobs a day which turns into about 1B events. It runs surprisingly cheap when you're willing to trade some safety away (turn off journaling and write concerns in Mongo). 3-node Hetzner MongoDB cluster where the primary does 20% utilization costs us around $1k/month. It has its limitations. Payloads can't hold tens of thousands of keys. Documents becomes too large to update efficiently. Some planning ahead is needed. And then there are no dimensions. Sometimes you can nest them (country - there are only so many countries), sometimes it's better to have dedicated metrics key per dimension (customer - growing forever). That multiplies tracked events, hence 1B events from 100M jobs. The libraries are MIT. The App is source-available under ELv2 - free to self-host and paid cloud if you want it managed. I build this on the side with no investor money to burn on a free service. Happy to answer anything about architecture, storage models, my failures or why I didn't give up on this yet.

  • Share This:  
  •  Facebook
  •  Twitter
  •  Google+
  •  Stumble
  •  Digg
Email ThisBlogThis!Share to XShare to Facebook
Newer Post Older Post Home

0 comments:

Post a Comment

Popular Posts

  • 简报:中美发表应对气候危机联合声明;医生称纳瓦尔尼病危
    By BY EMILY CHAN AND KONEY BAI from NYT World https://ift.tt/3dva1lP via IFTTT
  • New York Post Reporter Who Wrote False Kamala Harris Story Resigns
    By BY MICHAEL M. GRYNBAUM from NYT Business https://ift.tt/3aKd8Ex via IFTTT
  • New top story on Hacker News: Visa and Mastercard are getting overwhelmed by gamer fury over censorship
    Visa and Mastercard are getting overwhelmed by gamer fury over censorship 181 by mrzool | 134 comments on Hacker News.
  • New top story on Hacker News: The Power of Starting Again
    The Power of Starting Again 10 by memorable | 2 comments on Hacker News.
  • United Nations at 75 plagued by new crises and cash crunch
    Faced with wars, climate change and a pandemic, the United Nations is struggling to make an impact. from BBC News - World https://ift.tt/2...
  • New top story on Hacker News: My Experience with Claude Code After 2 Weeks of Adventures
    My Experience with Claude Code After 2 Weeks of Adventures 3 by dejavucoder | 0 comments on Hacker News.
  • New top story on Hacker News: Instrumenting Next.js with runtime secret injection
    Instrumenting Next.js with runtime secret injection 6 by nimishk | 3 comments on Hacker News.
  • Wildlife Tourism: सैलानियों की पहली पसंद बना ये टाइगर रिजर्व, तीन गुना हुए बाघ
    यहां बाघों की संख्या बढ़ने से वह अब आसानी से दिख जाते हैं। ये पार्क एशियाई हाथियों के लिए भी प्रसिद्ध है। लिहाजा यहां दो साल में पर्यटकों की...
  • New top story on Hacker News: Memoirs from a Japanese Internet Cafe
    Memoirs from a Japanese Internet Cafe 18 by bemmu | 1 comments on Hacker News.
  • New top story on Hacker News: Nuclear Waste Reprocessing Gains Momentum in the U.S.
    Nuclear Waste Reprocessing Gains Momentum in the U.S. 14 by rbanffy | 4 comments on Hacker News.

Recent Posts

Categories

  • BBC News
  • BBC News - Technology
  • BBC News - World
  • BOLLYWOOD Jagran Hindi News - entertainment:bollywood
  • CBNNews.com
  • CLASS 10 BEST BOOKS FOR BECOME A TOPPER
  • CRICKETJagran Hindi News - cricket:headlines
  • FOX NEWS
  • Hacker News
  • INDIAJagran Hindi News - news:national
  • NYT
  • Reuters: World News

Unordered List

Pages

  • Home

Text Widget

Blog Archive

  • ▼  2026 (383)
    • ▼  July (55)
      • New top story on Hacker News: MCP 2026-07-28 Speci...
      • US walks out of UN Security Council meeting during...
      • New top story on Hacker News: Tokio Gives Progress...
      • France and Spain wildfire witnesses describe 'wall...
      • New top story on Hacker News: Using ThinkPad T480 ...
      • New top story on Hacker News: Show HN: I made some...
      • Nigeria's president approves largest military expa...
      • New top story on Hacker News: Show HN: Trifle – Op...
      • Canada's 'powerful' dairy sector is in Trump's tra...
      • New top story on Hacker News: John C. Dvorak has died
      • Watch: Louvre reopens gallery after jewellery heist
      • New top story on Hacker News: ICE shared Medicaid ...
      • New top story on Hacker News: Everyone Should Know...
      • New top story on Hacker News: Laguna S 2.1
      • New top story on Hacker News: Agent swarms and the...
      • 'If only people knew what a tick could do' - the d...
      • New top story on Hacker News: Natural experiments ...
      • New top story on Hacker News: Less Is More: Why Au...
      • New top story on Hacker News: The Kimi K3 Moment
      • Trump threatens new Canada tariffs over fires send...
      • New top story on Hacker News: Homomorphically encr...
      • More than 500 Rohingya vanished at sea - what happ...
      • New top story on Hacker News: Schema Harness Achie...
      • At least one dead in Texas floods ravaging same ar...
      • New top story on Hacker News: Duskers, the scary c...
      • New top story on Hacker News: Inkling: Our Open-We...
      • What if Bluey spoke one of the world's oldest livi...
      • New top story on Hacker News: Guardian Angels: LLM...
      • How US commerce secretary's Epstein links were unc...
      • New top story on Hacker News: IBM Stock has worst day
      • Watch: Horses evacuated as fire approaches riding ...
      • South Africa says more than 53,000 foreigners depo...
      • New top story on Hacker News: Can We Understand Ho...
      • New top story on Hacker News: UPI: Anatomy of a Pa...
      • New top story on Hacker News: Show HN: Reame – a C...
      • More than 40 kidnapped children and teachers freed...
      • New top story on Hacker News: New York City to bec...
      • Watch: What links a bomb in Monaco and a shooting ...
      • New top story on Hacker News: Show HN: Abralo – Fr...
      • New top story on Hacker News: How to Start a Ruby ...
      • New top story on Hacker News: Cloudflare Drop
      • New top story on Hacker News: A bug which affected...
      • New top story on Hacker News: A new runtime for k ...
      • Watch: Moment rare tornado lashes central Chinese ...
      • New top story on Hacker News: Orasort: 5x faster c...
      • New top story on Hacker News: Installing A/UX 1.1 ...
      • Emotion and politics merge in Tehran at funeral of...
      • New top story on Hacker News: Zig: All Package Man...
      • New top story on Hacker News: EndBASIC 0.14: Are w...
      • New top story on Hacker News: Holes
      • New top story on Hacker News: Instead of banning A...
      • New top story on Hacker News: Exapunks
      • People smuggler convicted in France found by BBC l...
      • New top story on Hacker News: A complete ClickHous...
      • Fire kills five at Antwerp apartment block
    • ►  June (55)
    • ►  May (54)
    • ►  April (52)
    • ►  March (52)
    • ►  February (58)
    • ►  January (57)
  • ►  2025 (738)
    • ►  December (53)
    • ►  November (52)
    • ►  October (60)
    • ►  September (61)
    • ►  August (63)
    • ►  July (71)
    • ►  June (64)
    • ►  May (71)
    • ►  April (61)
    • ►  March (66)
    • ►  February (51)
    • ►  January (65)
  • ►  2024 (756)
    • ►  December (73)
    • ►  November (69)
    • ►  October (64)
    • ►  September (58)
    • ►  August (71)
    • ►  July (63)
    • ►  June (63)
    • ►  May (64)
    • ►  April (64)
    • ►  March (66)
    • ►  February (35)
    • ►  January (66)
  • ►  2023 (1593)
    • ►  December (64)
    • ►  November (69)
    • ►  October (80)
    • ►  September (112)
    • ►  August (111)
    • ►  July (129)
    • ►  June (135)
    • ►  May (181)
    • ►  April (173)
    • ►  March (189)
    • ►  February (166)
    • ►  January (184)
  • ►  2022 (2295)
    • ►  December (177)
    • ►  November (178)
    • ►  October (202)
    • ►  September (194)
    • ►  August (194)
    • ►  July (198)
    • ►  June (184)
    • ►  May (186)
    • ►  April (195)
    • ►  March (184)
    • ►  February (183)
    • ►  January (220)
  • ►  2021 (7845)
    • ►  December (335)
    • ►  November (635)
    • ►  October (656)
    • ►  September (636)
    • ►  August (713)
    • ►  July (713)
    • ►  June (690)
    • ►  May (707)
    • ►  April (690)
    • ►  March (713)
    • ►  February (644)
    • ►  January (713)
  • ►  2020 (8315)
    • ►  December (713)
    • ►  November (688)
    • ►  October (614)
    • ►  September (690)
    • ►  August (713)
    • ►  July (713)
    • ►  June (690)
    • ►  May (713)
    • ►  April (690)
    • ►  March (711)
    • ►  February (667)
    • ►  January (713)
  • ►  2019 (19506)
    • ►  December (712)
    • ►  November (689)
    • ►  October (712)
    • ►  September (681)
    • ►  August (712)
    • ►  July (713)
    • ►  June (689)
    • ►  May (2935)
    • ►  April (2907)
    • ►  March (3014)
    • ►  February (2731)
    • ►  January (3011)
  • ►  2018 (21108)
    • ►  December (3036)
    • ►  November (2927)
    • ►  October (3024)
    • ►  September (2931)
    • ►  August (3016)
    • ►  July (3033)
    • ►  June (2790)
    • ►  May (350)
    • ►  March (1)

About Me

Champ
View my complete profile
Powered by Blogger.

Sample Text

Copyright © latest news | Powered by Blogger
Design by Hardeep Asrani | Blogger Theme by NewBloggerThemes.com