frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

fp.

Open in hackernews

Show HN: SynapServe – zero-allocation HTTP server in Rust with io_uring

https://synapserve.io
1•Meatack•1h ago
I've been building an HTTP server from scratch in Rust, designed around zero heap allocations on the hot path. No async runtime, no framework — just io_uring, a custom HTTP parser, and a thread-per-core architecture.

The parser is the part I'm most proud of. Instead of allocating strings for each parsed field, everything is a Span { off: u16, len: u16 } — a 4-byte view into the original buffer. The full header table is [Header; 64] on the stack (640 bytes). During parsing, it also extracts content-length/chunked/keep-alive and builds an O(1) known-header index (21 common headers tracked in a fixed array). Header lookup after parsing is a single array dereference — about 0.6 ns vs 20-23 ns for a linear scan.

I benchmarked head-to-head against httparse (the parser behind hyper/axum/actix-web), same machine, same inputs, Criterion: - Small request (35B): 42 ns vs 52 ns - 1.25x faster - Medium request (368B, 9 headers): 200 ns vs 230 ns - 1.15x faster - Large request (733B, 20 headers): 420 ns vs 466 ns - 1.11x faster

synapserve does strictly more work per parse than httparse (semantic extraction + header indexing) and is still faster. The gap widens to 1.38-1.46x when you add equivalent semantic extraction to httparse. SIMD scanning (AVX2/SSE4.2 with runtime detection, NEON on ARM64) handles header name validation, header value validation, and URI scanning at 16-32 bytes per instruction.

The I/O layer uses io_uring with: - Multishot accept (one SQE, N connections) - Multishot recv with provided buffer rings (kernel picks the buffer, no userspace allocation) - Zero-copy send (SEND_ZC) and splice for static files and proxy relay - kTLS — rustls does the TLS 1.3 handshake, then session keys are installed in the kernel via setsockopt(SOL_TLS). After that, the kernel handles encrypt/decrypt transparently, so SEND_ZC and splice still work through TLS.

Each worker thread owns its connections, buffers, and ring. Connection state is a flat array indexed by slot, with generation counters for stale CQE detection. What works today: HTTP/1.1 request handling, radix-tree router, virtual hosts, static file serving (ETag, Range, Brotli), reverse proxy with upstream load balancing (weighted round-robin, least-conn, IP hash, health tracking, automatic failover, zero-copy splice relay), TLS 1.3 with kTLS.

Static file serving benchmarks (wrk, 256 connections): 205K req/s on small files (+79% vs nginx), 14.5MB RSS.

What doesn't exist yet: HTTP/2, HTTP/3, WebSocket. These are next. Honest limitations: - Linux-only (io_uring). No plans for macOS/Windows support. - HTTP/1.1 only for now. HTTP/2 is in progress. - The parser uses u16 spans, so max header area is 64KB. Fine for real traffic, but it's a hard limit. - Single-machine only. No clustering or distributed config. - Not production-battle-tested yet. It works and benchmarks well, but it hasn't handled real traffic at scale.

All the benchmark code is a separate crate with the exact same inputs for both parsers — nothing cherry-picked. The parser deep dive with methodology is on the site.

https://synapserve.io

Parser benchmark writeup: https://synapserve.io/posts/http-parser-performance/ Happy to answer any questions about the architecture, the io_uring integration, or the SIMD scanning approach.

We Shouldn't Fight Automation

https://www.update.news/p/why-we-shouldnt-fight-automation
1•StefanSchubert•21s ago•0 comments

First-of-a-kind stem-cell therapies set for approval in Japan

https://www.nature.com/articles/d41586-026-00585-x
1•Brajeshwar•37s ago•0 comments

Bhutan's crypto experiment shows how hard digital money is in the real world

https://restofworld.org/2026/bhutan-bitcoin-tourism-payment-adoption-failure/
1•Brajeshwar•51s ago•0 comments

AI 2027 and the Shrinking of Understanding

https://nader.io/posts/ai-2027/
1•nader•52s ago•0 comments

OpenClaw Meets Healthcare

https://evestel.substack.com/p/how-i-build-my-personal-openclaw
1•brandonb•54s ago•0 comments

I'm a 15-year-old girl. Here's the vile misogyny I face daily on social media

https://www.theguardian.com/commentisfree/2026/feb/23/15-year-old-girl-misogyny-social-media-onli...
1•randycupertino•1m ago•0 comments

Female Reproductive Tract-on-a-Chip for selecting healthier sperm

https://www.nature.com/articles/s41378-026-01165-9
1•TEHERET•1m ago•0 comments

Covert DEI Design Techniques for Earthly Survival in Hostile Contexts

https://dl.acm.org/doi/10.1145/3750069.3755946
1•tokai•1m ago•0 comments

LFM2-24B-A2B: Scaling Up the LFM2 Architecture

https://www.liquid.ai/blog/lfm2-24b-a2b
1•salkahfi•1m ago•0 comments

Some SQL history lesson with Oracle V2

https://databaseblog.myname.nl/2026/02/some-sql-history-with-oracle-v2.html
1•dveeden2•1m ago•0 comments

Metabolism, not cells or genetics, may have begun life on Earth

https://bigthink.com/starts-with-a-bang/metabolism-begun-life-earth/
1•Brajeshwar•1m ago•0 comments

Walkman.land

https://walkman.land/
1•ohjeez•1m ago•0 comments

Show HN: DoNotify – Google Calendar reminders as phone calls(not notifications)

https://donotifys.com
1•micahele•2m ago•0 comments

There's software, and then there's promptware

https://kelvinfichter.com/pages/thoughts/promptware/
1•kfichter•3m ago•0 comments

EDRi Open Letter: We say no to Big Tech mass snooping on our messages

https://edri.org/our-work/open-letter-we-say-no-to-big-tech-mass-snooping-on-our-messages/
1•robtherobber•4m ago•0 comments

Tim Cook Warned by CIA That China Could Move on Taiwan by 2027

https://www.macrumors.com/2026/02/24/tim-cook-warned-by-cia-china-taiwan-2027/
1•stalfosknight•4m ago•1 comments

IBM stock tumbles 10% after Anthropic launches COBOL AI tool

https://finance.yahoo.com/news/ibm-stock-tumbles-10-anthropic-194042677.html
2•jspdown•6m ago•0 comments

Data center builders thought farmers would willingly sell land, learn otherwise

https://arstechnica.com/tech-policy/2026/02/im-not-for-sale-farmers-refuse-to-take-millions-in-da...
3•stalfosknight•7m ago•0 comments

Towards a Science of AI Agent Reliability

https://arxiv.org/abs/2602.16666
1•smartmic•7m ago•0 comments

How we made Docker builds 193x faster across AI agent sessions

https://blog.helix.ml/p/how-we-made-docker-builds-193x-faster
1•quesobob•9m ago•0 comments

Ask HN: Did your client ever replace you by a more junior freelancer?

1•goingbananas•10m ago•0 comments

Addressing your questions about the Cyber Resilience Act

https://fsfe.org/news/2026/news-20260224-01.html
2•Tomte•10m ago•0 comments

I don't care what tools you use. But – and this is a big but

https://come-from.mad-scientist.club/@algernon/statuses/01KHYGWT17C1HNKRCVBMYTZVHQ
2•latexr•12m ago•0 comments

Show HN: StarkZap – Gasless Bitcoin Payments SDK for TypeScript

https://github.com/keep-starknet-strange/starkzap
1•starkience•12m ago•2 comments

Mercury 2: Diffusion Reasoning Model

https://www.inceptionlabs.ai/blog/introducing-mercury-2
2•zof3•12m ago•0 comments

SpacetimeDB 2.0 [video]

https://www.youtube.com/watch?v=C7gJ_UxVnSk
9•aleasoni•12m ago•1 comments

Show HN: Awsim – Lightweight AWS emulator in Go (40 services in progress)

https://github.com/sivchari/awsim
2•sivchari•13m ago•0 comments

Stripe valued at $159B, 2025 annual letter

https://stripe.com/newsroom/news/stripe-2025-update
3•jez•13m ago•0 comments

The Schema Language Question: The Quest for a Single Source of Truth

https://www.chiply.dev/post-schema-languages
1•chiply•14m ago•0 comments

OpenClaw led to a user's Gmail account being disabled

https://twitter.com/iamlukethedev/status/2025782621066899873
2•idoxer•14m ago•0 comments