frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

fp.

Open in hackernews

Show HN: Detecting API degradation before thresholds are crossed

3•AnchorFlow•1h ago
While building a payment orchestration system, I ran into a problem: Most monitoring tools alert when a threshold is already breached (e.g. P95 > 1000ms). But in practice, systems often degrade before hitting those limits — especially under bursty traffic. So I experimented with detecting degradation before thresholds are crossed, directly inside a FastAPI app. I built a small middleware that:

Tracks P95 latency per route template (e.g. /users/{id}) Learns a baseline dynamically from recent traffic Detects spikes using rate-of-change (not just static thresholds) Computes a 0–100 health score with trend direction (improving / stable / degrading) Stores events in Redis Streams for replay and debugging

One interesting result: In synthetic load tests (gradual latency ramp from ~200ms to ~1200ms over 60 seconds, with a P95 warning threshold at 1000ms), rate-of-change detection consistently surfaced degradation slightly before static threshold alerts. The window is small, but it was often enough to notice system stress before crossing alert thresholds.

Design constraints:

Near-zero overhead on the request path (async, fire-and-forget writes) Must fail silently if Redis is unavailable No external monitoring stack required (runs in-app)

Example usage: pythonapp.add_middleware(RequestMetricsMiddleware, alert_engine=engine)

Context: This is part of a larger system I'm building that integrates cloud services with mobile money APIs (EcoCash, etc.), where partial failures and latency spikes are common. Still early — hasn't been tested under real production traffic yet.

Curious how others are handling early degradation detection in FastAPI or similar systems. Repo: https://github.com/Tandem-Media/fastapi-alertengine PyPI: https://pypi.org/project/fastapi-alertengine/

Taint: Testing Artifact Integrity by Non-Repudiable Tampering

https://github.com/juli/taint
1•wslh•33s ago•0 comments

The Oil Market Breaking Point Is Here

https://www.hfir.com/p/wctw-the-oil-market-breaking-point-eab
1•endorphine•54s ago•0 comments

Show HN: Too many browser tabs I solved it with a simple electron app

https://github.com/magland/tabs/blob/main/README.md
1•jmagland•1m ago•0 comments

Show HN: LennyFighter: A multiplayer fighting game on Cloudflare Durable Objects

https://lennyfighter.com
1•iglesiasbrandon•1m ago•0 comments

The Role of a New Machine

https://newsletter.dancohen.org/archive/the-role-of-a-new-machine/
1•speckx•2m ago•0 comments

Map 236 years of US constitutional power on a grid: where design meets reality

https://www.papercutslibrary.com/explore/constitutional-reality-framework/
1•apeconmyth•3m ago•0 comments

Alarms Sound over 'Technofascist' Palantir Manifesto

https://www.commondreams.org/news/palantir-technofascist-manifesto-criticism
1•abdelhousni•3m ago•0 comments

An AI bot is running a retail store. Is this the future?

https://www.usatoday.com/story/money/2026/04/21/ai-boss-retail-store-future-shopping/89649006007/
1•alhazrod•4m ago•0 comments

CATL's new LFP battery can charge from 10 to 98% in less than 7 minutes

https://arstechnica.com/cars/2026/04/catls-new-lfp-battery-can-charge-from-10-to-98-in-less-than-...
1•ndr42•5m ago•0 comments

Rapidhash Unity Port

https://aras-p.info/blog/2026/03/07/Rapidhash-Unity-port/
1•klaussilveira•5m ago•0 comments

Vector math library codegen in Debug (2024)

https://aras-p.info/blog/2024/09/14/Vector-math-library-codegen-in-Debug/
1•klaussilveira•6m ago•0 comments

Blue Origin's New Glenn Fails Third Launch, Jeopardizing NASA Moon Plans

https://www.techbuzz.ai/articles/blue-origin-s-new-glenn-fails-third-launch-jeopardizing-nasa-moo...
1•Vaslo•6m ago•0 comments

EU Commission awards €180M tender for sovereign cloud to four European providers

https://ec.europa.eu/commission/presscorner/home/en
1•mweibel•7m ago•0 comments

Concluding the Arc Experiment (Email)

https://www.ietf.org/archive/id/draft-adams-arc-experiment-conclusion-00.html
1•DASD•8m ago•0 comments

Show HN: Runner – A Better Claude Cowork

https://runner.now
5•kentf•8m ago•1 comments

Former ransomware negotiator pleads guilty to BlackCat attacks

https://www.bleepingcomputer.com/news/security/former-ransomware-negotiator-pleads-guilty-to-blac...
1•Brajeshwar•9m ago•0 comments

SuperDisk: The Better Floppy That Never Caught On

https://hackaday.com/2026/04/21/superdisk-the-better-floppy-that-never-caught-on/
1•speckx•9m ago•0 comments

Show HN: My Silly Sun Server

https://technically.kakwalab.ovh/posts/silly-sun-server-intro/
1•kakwa_•11m ago•0 comments

Falling fertility, debt and AI: is the US headed toward a population crisis?

https://www.theguardian.com/business/2026/apr/19/us-population-fertility-rate
3•Teever•13m ago•0 comments

A Harness for Claude Code

https://euleptos.com
3•obius_prime•14m ago•0 comments

Months of Flaky CI. The Root Cause Analysis Was in CloudTrail All Along

https://infrahouse.com/blog/2026-04-20-ci-was-failing-every-other-day-for-months/
2•aleks2•14m ago•0 comments

Show HN: Easily share games made by you/ your kids/ your dog etc.

https://arcadelab.ai
2•mlapeter•14m ago•0 comments

Opus 4.7 isn't dumb, it's just lazy

https://shimin.io/journal/opus-4-7-just-lazy/
2•recurrence•16m ago•0 comments

Moving Past Bots vs. Humans

https://blog.cloudflare.com/past-bots-and-humans/
2•doomrobo•16m ago•0 comments

I made a research test suite for analysis of software metrics overtime

https://abigail.sh/writing/historical-analysis-of-software-metrics/
3•abigailphoebe•17m ago•1 comments

Why Are Palantir and OpenAI Scared of Alex Bores?

https://www.youtube.com/watch?v=znKb71kLG5c
2•frm88•17m ago•0 comments

Designing web interfaces with Claude Code

https://segbedji.com/designing-interfaces-with-claude-code/
2•segbedji•17m ago•0 comments

Better (Free) GitHub Readme Widgets

https://gh-stats.com
2•s_manor•18m ago•1 comments

The Luddites Were the First to Attack AI

https://marginalrevolution.com/marginalrevolution/2026/04/the-luddites-were-the-first-to-attack-a...
2•speckx•18m ago•0 comments

Is your site agent-ready?

https://blog.cloudflare.com/agent-readiness/
2•tgdn•18m ago•0 comments