frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

fp.

Open in hackernews

Show HN: StreamGate – A lock-free observability proxy in Go

https://github.com/sashu2310/streamgate
2•sandeepk235•2h ago

Comments

sandeepk235•2h ago
Show HN: StreamGate – A lock-free observability proxy in Go

Hey HN,

I built StreamGate to solve a specific problem: our observability bills (Datadog/Splunk) were scaling linearly with traffic, mostly due to low-value "noise" logs (DEBUG, health checks, etc.) that we rarely queried.

Existing solutions were either "all-or-nothing" agents or heavy Java/Enterprise pipelines. I wanted something lightweight that could sit at the network edge and act as a smart valve.

The Architecture: It uses a Split-Plane design:

Control Plane (Python): Handles config validation and API requests (FastAPI).

Data Plane (Go): Handles the hot path.

Technical Implementation Details: Instead of standard Go Channels (which I found created too much GC pressure at high throughput), I implemented a fixed-size Ring Buffer using sync/atomic primitives.

Lock-Free: The hot path uses atomic pointers to swap configuration rules, so we can "hot reload" rules without stopping the world or acquiring a Mutex.

Fail-Open: It implements a circuit breaker; if the ring buffer fills up (>80%), it degrades to pass-through mode rather than dropping logs or blocking the app.

Performance: On my local machine (M2), it handles ~200k events/sec with minimal allocation.

I’d love critical feedback on the ring buffer implementation or the split-plane approach.

moh_quz•1h ago
nice to see more go tooling. curious how you handled the lock-free part - was it mostly atomics or just clever channel usage?

always found backpressure tricky to handle without locks.

sandeepk235•53m ago
It's mostly atomics, with a deliberate design choice to avoid traditional backpressure.

1. Lock-Free Parts (Atomics) The ring buffer relies on atomic.Uint64 for head/tail cursors. Also, hot-swapping the processor chain uses atomic.Pointer[T] to ensure the worker loop never blocks even during a config reload:

// Worker reads config without locks currentChain := p.chain.Load() currentChain.Process(data)

// Config updates swap the pointer atomically p.chain.Store(newChain)

I intentionally avoided channels for the data path. Benchmarks showed that at >100k msgs/sec, the channel allocation/locking overhead was 2-3x costlier than the ring buffer approach.

Handling Backpressure: I Don't (Intentionally) You're right that backpressure is tricky without locks. My approach was to eliminate the need for it:

Drop-on-full: If saturated, new logs are dropped (preserves recent history, non-blocking) Fail-open circuit breaker: If buffer >80% full, bypass processing to drain faster Philosophy: For observability, dropping overflow is better than blocking ingestion The honest answer: This isn't "wait-free" in the academic sense—WaitGroup is used in output fanout. But the ingestion→buffering path has zero mutexes.

Show HN: AppScreenshots – AI-Powered App Store Screenshot Generator

https://www.appscreenshots.net
1•horace168•5m ago•0 comments

Notes from Neal Gabler's Walt Disney

https://notes.eatonphil.com/2023-02-18-neal-gabler-walt-disney-notes.html
1•ibobev•6m ago•0 comments

Writing a mockable Filesystem trait in Rust without RefCell

https://pyk.sh/blog/2025-12-15-writing-mockable-fs-in-rust-without-refcell
1•peeyek•6m ago•0 comments

Copywriters reveal how AI has decimated their industry

https://www.bloodinthemachine.com/p/i-was-forced-to-use-ai-until-the
1•thm•6m ago•0 comments

Generating and using Let's Encrypt wildcard certificates with cert‑manager

https://chuniversiteit.nl/operations/wildcard-certificates-in-kubernetes
1•ibobev•6m ago•0 comments

When LICM Fails Us

https://xania.org/202512/14-licm-when-it-doesnt
1•ibobev•7m ago•0 comments

AI Analyzes Language as Well as a Human Expert

https://www.wired.com/story/in-a-first-ai-models-analyze-language-as-well-as-a-human-expert/
1•Brajeshwar•8m ago•0 comments

Olmo 3 and the Open LLM Renaissance

https://cameronrwolfe.substack.com/p/olmo-3
1•Philpax•16m ago•0 comments

Amiga Old Blue Workbench

https://aminet.net/package/util/wb/OBWorkbench
1•doener•17m ago•0 comments

Vibe Coding hit a wall: How I fixed $0.30/error OOMs and cut AI costs by 70%

https://blog.videowatermarkremove.com/vibe-coding-hit-a-wall-how-i-fixed-030error-ooms-and-cut-ai...
1•ilmj8426•23m ago•0 comments

Ask HN: What is Safe Superintelligence Inc building?

https://ssi.inc
1•javantanna•25m ago•1 comments

Lazy GeoParquet Reading in SedonaDB, DuckDB, GeoPandas, and GDAL

https://dewey.dunnington.ca/post/2025/lazy-geoparquet-reading-in-sedonadb-duckdb-geopandas-and-gdal/
1•marklit•28m ago•0 comments

AI should explain itself (more)

https://www.noemamag.com/the-politics-of-superintelligence/
2•d4rkn0d3z•32m ago•1 comments

Why is South Korean fertility so low?

https://www.worksinprogress.news/p/why-is-south-korean-fertility-so
3•ortegaygasset•35m ago•0 comments

Playbook-Based Agent Reference Architecture

https://chatbotkit.com/examples/playbook-based-agent-reference-architecture
2•_pdp_•39m ago•3 comments

What's a piece of tech you were excited about but stopped using?

3•bobbyblackstone•40m ago•2 comments

Show HN: Gemini, OpenAI, Claude, Grok and Mistral argue over everything

https://llmxllm.com/
1•mananonhn•41m ago•1 comments

The strangest programming languages you've ever heard of

https://www.omnesgroup.com/weirdest-programming/
1•birdculture•43m ago•0 comments

AI tool that audits UI and generates fixes(built in 36 hours)

https://blopai.com/
1•Laurlund449•44m ago•1 comments

Does Liking Yellow Imply Driving a School Bus? Semantic Leakage in LLMs

https://arxiv.org/abs/2408.06518
3•trueduke•45m ago•0 comments

Show HN: Solving Zodiac's Z32 – top candidate has anomaly visible from space

https://github.com/dstampher/zodiac-z32-cipher
2•dstamp•45m ago•0 comments

Facial recognition should not be introduced without Scottish Givernment sign off

https://www.thenational.scot/news/25696771.orwellian-facial-recognition-shouldnt-introduced-witho...
1•nephihaha•51m ago•1 comments

The left has become preserve of old white men

https://www.thenational.scot/politics/25696958.radical-left-become-preserve-old-white-men/
3•nephihaha•53m ago•3 comments

My AI Usage Manifesto

https://jshamsul.com/essays/2025-12-13-my-ai-usage-manifesto
2•jibone•54m ago•1 comments

The Gorman Paradox: An Explanation? – Codemanship's Blog

https://codemanship.wordpress.com/2025/12/15/the-gorman-paradox-an-explanation/
1•rbanffy•58m ago•0 comments

Rejecting rebase and stacked diffs, my way of doing atomic commits

https://iain.rocks/blog/2025/12/15/rejecting-rebase-and-stack-diffs-my-way-of-doing-atomic-commits
1•that_guy_iain•1h ago•0 comments

SK Hynix Forecasts Tight Memory Supply Lasting Through 2028

https://www.techpowerup.com/344063/sk-hynix-forecasts-tight-memory-supply-lasting-through-2028
1•akyuu•1h ago•0 comments

Chain Prompts Like Unix Tools with Dotprompt

https://pythonic.ninja/blog/2025-11-27-dotprompt-unix-pipes/
1•PythonicNinja•1h ago•0 comments

Show HN: LeagueOfLegends AI Coach

https://github.com/sorena-ai/LeagueAiCoach
1•danielbedrood•1h ago•0 comments

Show HN: Turn LinkedIn/GitHub into a personal website in 2 min (open-source)

https://github.com/yashrathi-git/portfolioly
1•produktive•1h ago•0 comments