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•1mo ago

Comments

sandeepk235•1mo 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•1mo 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•1mo 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.

Eight More Months of Agents

https://crawshaw.io/blog/eight-more-months-of-agents
1•archb•1m ago•0 comments

From Human Thought to Machine Coordination

https://www.psychologytoday.com/us/blog/the-digital-self/202602/from-human-thought-to-machine-coo...
1•walterbell•2m ago•0 comments

The new X API pricing must be a joke

https://developer.x.com/
1•danver0•3m ago•0 comments

Show HN: RMA Dashboard fast SAST results for monorepos (SARIF and triage)

https://rma-dashboard.bukhari-kibuka7.workers.dev/
1•bumahkib7•3m ago•0 comments

Show HN: Source code graphRAG for Java/Kotlin development based on jQAssistant

https://github.com/2015xli/jqassistant-graph-rag
1•artigent•8m ago•0 comments

Python Only Has One Real Competitor

https://mccue.dev/pages/2-6-26-python-competitor
2•dragandj•10m ago•0 comments

Tmux to Zellij (and Back)

https://www.mauriciopoppe.com/notes/tmux-to-zellij/
1•maurizzzio•10m ago•1 comments

Ask HN: How are you using specialized agents to accelerate your work?

1•otterley•12m ago•0 comments

Passing user_id through 6 services? OTel Baggage fixes this

https://signoz.io/blog/otel-baggage/
1•pranay01•12m ago•0 comments

DavMail Pop/IMAP/SMTP/Caldav/Carddav/LDAP Exchange Gateway

https://davmail.sourceforge.net/
1•todsacerdoti•13m ago•0 comments

Visual data modelling in the browser (open source)

https://github.com/sqlmodel/sqlmodel
1•Sean766•15m ago•0 comments

Show HN: Tharos – CLI to find and autofix security bugs using local LLMs

https://github.com/chinonsochikelue/tharos
1•fluantix•16m ago•0 comments

Oddly Simple GUI Programs

https://simonsafar.com/2024/win32_lights/
1•MaximilianEmel•16m ago•0 comments

The New Playbook for Leaders [pdf]

https://www.ibli.com/IBLI%20OnePagers%20The%20Plays%20Summarized.pdf
1•mooreds•16m ago•0 comments

Interactive Unboxing of J Dilla's Donuts

https://donuts20.vercel.app
1•sngahane•18m ago•0 comments

OneCourt helps blind and low-vision fans to track Super Bowl live

https://www.dezeen.com/2026/02/06/onecourt-tactile-device-super-bowl-blind-low-vision-fans/
1•gaws•20m ago•0 comments

Rudolf Vrba

https://en.wikipedia.org/wiki/Rudolf_Vrba
1•mooreds•20m ago•0 comments

Autism Incidence in Girls and Boys May Be Nearly Equal, Study Suggests

https://www.medpagetoday.com/neurology/autism/119747
1•paulpauper•21m ago•0 comments

Wellness Hotels Discovery Application

https://aurio.place/
1•cherrylinedev•22m ago•1 comments

NASA delays moon rocket launch by a month after fuel leaks during test

https://www.theguardian.com/science/2026/feb/03/nasa-delays-moon-rocket-launch-month-fuel-leaks-a...
1•mooreds•22m ago•0 comments

Sebastian Galiani on the Marginal Revolution

https://marginalrevolution.com/marginalrevolution/2026/02/sebastian-galiani-on-the-marginal-revol...
2•paulpauper•26m ago•0 comments

Ask HN: Are we at the point where software can improve itself?

1•ManuelKiessling•26m ago•1 comments

Binance Gives Trump Family's Crypto Firm a Leg Up

https://www.nytimes.com/2026/02/07/business/binance-trump-crypto.html
1•paulpauper•26m ago•1 comments

Reverse engineering Chinese 'shit-program' for absolute glory: R/ClaudeCode

https://old.reddit.com/r/ClaudeCode/comments/1qy5l0n/reverse_engineering_chinese_shitprogram_for/
1•edward•26m ago•0 comments

Indian Culture

https://indianculture.gov.in/
1•saikatsg•29m ago•0 comments

Show HN: Maravel-Framework 10.61 prevents circular dependency

https://marius-ciclistu.medium.com/maravel-framework-10-61-0-prevents-circular-dependency-cdb5d25...
1•marius-ciclistu•29m ago•0 comments

The age of a treacherous, falling dollar

https://www.economist.com/leaders/2026/02/05/the-age-of-a-treacherous-falling-dollar
2•stopbulying•29m ago•0 comments

Ask HN: AI Generated Diagrams

1•voidhorse•32m ago•0 comments

Microsoft Account bugs locked me out of Notepad – are Thin Clients ruining PCs?

https://www.windowscentral.com/microsoft/windows-11/windows-locked-me-out-of-notepad-is-the-thin-...
8•josephcsible•32m ago•3 comments

Show HN: A delightful Mac app to vibe code beautiful iOS apps

https://milq.ai/hacker-news
6•jdjuwadi•35m ago•1 comments