frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

fp.

Open in hackernews

I modeled traffic-weighted SLOs as probability chains in PromQL

1•lep_qq•1h ago
Most SLO tools treat a user journey as binary: either all services are up, or the whole thing is down. That breaks when traffic doesn't flow uniformly through all your services.

The checkout SLO that lied Three services: checkout-base (99.9%), payments (99.95%), coupon (99.5%). A naive AND composition gives a system SLO of ~99.35%.

But 90% of users never hit the coupon service. Only 10% go through base → coupon → payments. The coupon service drags the number down, but it only affects a tenth of my traffic.

The correct formula is:

e_total = 1 - ( 0.9 × (1 - e_base) × (1 - e_payments) + 0.1 × (1 - e_base) × (1 - e_coupon) × (1 - e_payments) ) Each route is a chain where all services must succeed (multiply success rates). Weights represent traffic share and must sum to 1.

Translating this into PromQL PromQL has no native "product of a set" operator. What it has is scalar(), which collapses a single-element vector into a scalar — exactly what you need when each slok:sli_error_rate recording rule returns one value.

The generated rule for a 5m window:

1 - ( 0.9 * ( (1 - scalar(slok:sli_error_rate:5m{slo_name="checkout-base-slo",...})) * (1 - scalar(slok:sli_error_rate:5m{slo_name="payments-slo",...})) ) + 0.1 * ( (1 - scalar(slok:sli_error_rate:5m{slo_name="checkout-base-slo",...})) * (1 - scalar(slok:sli_error_rate:5m{slo_name="coupon-slo",...})) * (1 - scalar(slok:sli_error_rate:5m{slo_name="payments-slo",...})) ) ) scalar() is load-bearing. Without it you'd be multiplying labeled vectors with different label sets — PromQL would try to join them and fail.

The rule is generated for each evaluation window (5m, 1h, 6h, 3d, 7d, 30d) and stored as slok:sli_error_composition_rate:WINDOW. Everything downstream — burn rate, alerts, status — consumes this single metric without knowing how it was produced.

The YAML interface

kind: SLOComposition spec: target: 99.9 window: 30d objectives: - name: base ref: { name: checkout-base-slo } - name: payments ref: { name: payments-slo } - name: coupon ref: { name: coupon-slo } composition: type: WEIGHTED_ROUTES params: routes: - name: no-coupon weight: 0.9 chain: [base, payments] - name: with-coupon weight: 0.1 chain: [base, coupon, payments] With the composed error rate as a recording rule, the standard multi-window burn rate pipeline works unchanged. The alert fires when the composed journey is burning budget too fast — not when any single service degrades, but when the degradation actually impacts users at the rate the weights predict.

Limitations scalar() assumes each input recording rule returns exactly one series. If a query matches multiple series, scalar() returns NaN and the composition breaks silently. Also: duplicate alias detection in routes isn't enforced yet by the webhook.

This is alpha. Feedback on the API shape welcome.

Repo: https://github.com/federicolepera/slok

The Shortcut No One Talks About in Early Stage Startups

1•vibecoder21•38s ago•0 comments

Solar in poor countries is creating a lead hazard

https://www.slowboring.com/p/solar-in-poor-countries-is-creating
1•ep_jhu•1m ago•0 comments

Show HN: Bashd – Helper scripts for bulk CLI file management

https://github.com/terpinedream/Bashd
1•terpinedream•3m ago•0 comments

No-backprop SNN scores 98.2% on Split-MNIST task-incremental, age 14

https://github.com/theGcmd/SNNcontinual-learning
1•theGcmd•4m ago•0 comments

Major data leak forum dismantled in international cybercrime operation

https://www.europol.europa.eu/media-press/newsroom/news/major-data-leak-forum-dismantled-in-globa...
1•dryadin•5m ago•0 comments

Show HN: Scout-and-Wave – Parallel agent coordination via prompts

https://github.com/blackwell-systems/scout-and-wave
2•daynablackwell•5m ago•0 comments

New RAGLight feature: deploy a RAG pipeline as a REST API with one command

https://github.com/Bessouat40/RAGLight
2•bessouat40•5m ago•1 comments

Monday CEO "If you think about any company, 90% of the context isn't documented"

1•kalturnbull•6m ago•0 comments

The Best AI Tools That Respect Your Privacy

https://decrypt.co/359454/best-ai-tools-respect-privacy
3•eustoria•6m ago•0 comments

Agent frameworks are solving the wrong problem

https://github.com/MrPrinceRawat/kanly
2•mrprincerawat•6m ago•1 comments

Ask HN: Will using LinkedIn with OpenClaw get me banned?

2•Vishal19111999•7m ago•0 comments

A taxonomy of text output (from tools that want to be too clever)

https://utcc.utoronto.ca/~cks/space/blog/sysadmin/ProgramTextOutputTaxonomy
1•ingve•7m ago•0 comments

Ask HN: Will using WhatsApp with OpenClaw get my account banned?

2•Vishal19111999•7m ago•0 comments

Who Writes the Bugs? A Deeper Look at 125,000 Kernel Vulnerabilities

https://pebblebed.com/blog/kernel-bugs-part2
1•MBCook•8m ago•0 comments

The uncomfortable truth about getting people off US tech

https://blog.dougbelshaw.com/getting-off-us-tech/
1•eustoria•8m ago•0 comments

Eight Sleep raises $50M at $1.5B valuation

https://techcrunch.com/2026/03/04/eight-sleep-raises-50m-at-1-5b-valuation/
1•simonebrunozzi•8m ago•0 comments

Show HN: Non-Human Assistant with near AGI capabilities

https://github.com/AmplifyCo/novabot
1•amplifyco•9m ago•0 comments

Show HN: QLoRA fine-tuning in .zse INT4 format by ZSE

1•zyoralabs•9m ago•0 comments

Bluesky's Firehose in 3D

https://firehose3d.theo.io/
1•thrance•13m ago•0 comments

Tape as Context

https://tape.systems/
1•recrush•13m ago•0 comments

Stockpile witholding funds, support is non-existent

1•kaishiro•16m ago•0 comments

How Tech Turned Against Women

https://www.ft.com/content/60e2a900-8999-46cc-8107-4f468f442aae
3•mooreds•16m ago•1 comments

Show HN: CodexBar for Android – Monitor Claude quotas on your phone

https://github.com/hyunnnchoi/CodexBar-android
1•hyunnnchoi•16m ago•0 comments

Lovable Alternative for Product Teams

https://www.omniflow.team
1•stellaartois•17m ago•1 comments

DARPA to develop biological chips for low-power AI training at the edge

https://www.datacenterdynamics.com/en/news/darpa-o-circuit-program-aims-to-develop-unconventional...
1•giuliomagnifico•17m ago•0 comments

The Taxonomy of Pointers (2025)

https://mcyoung.xyz/2021/05/24/ptr-taxonomy/
3•vinhnx•17m ago•0 comments

Why we'll never see a yokozuna in the Super Bowl

https://www.japantimes.co.jp/sports/2026/02/11/sumo/sumo-vs-nfl/
1•PaulHoule•17m ago•0 comments

The Art of Formatting Code (2025)

https://mcyoung.xyz/2025/03/11/formatters/
1•vinhnx•18m ago•0 comments

The Prolific Output of Wes McKinney in the Age of Agentic Engineering

https://posit.co/blog/the-prolific-output-of-wes-mckinney-in-the-age-of-agentic-engineering/
4•richmeister•18m ago•0 comments

Brian Cox: The terrifying possibility of the Great Filter [video]

https://www.youtube.com/watch?v=rXfFACs24zU
1•whicks•18m ago•0 comments