hn.today

Show HN: Pgxio – a tiny PostgreSQL layer inside Nginx

github.com10 points0 comments
Screenshot of Show HN: Pgxio – a tiny PostgreSQL layer inside Nginx

Pgxio is an experimental, SQL-first REST and WebSocket backend built as a Rust dynamic module inside Nginx, using nonblocking libpq to connect to PostgreSQL. Developers expose selected PostgreSQL functions as HTTP endpoints rather than making database functions broadly addressable. It supports JWT authentication, optional JSON Schema input/output validation, and authorized WebSocket invalidation signals; clients use those signals to refetch data through REST. The example separates database owner, executor, and runtime roles, and keeps private-table access away from the runtime role. TypeScript and Python/Django clients and generated types are included as source, but no SDK packages or release binaries are published.

The project reports historical local RPC benchmarks showing 1.7-3.9 times PostgREST’s throughput and about 60% lower API memory in tested cases. These results used a shared host, one API core, four PostgreSQL cores, and matched SQL/JWT fixtures; they are not guarantees for the current preview or broad comparisons. An optional patched-libpq build can forward eligible large plaintext request bodies from Nginx buffers without intermediate copies in Rust and libpq, but the default uses stock libpq. Pgxio is explicitly not production-ready: validation covers six Linux ARM64 platform combinations, while amd64 and FreeBSD checks, sustained soak and fuzz testing, and independent security review remain outstanding. Its WebSocket signals are ephemeral, not durable event delivery, and deployment capacity and managed-service compatibility are unestablished.

Read on github.com0 comments on Hacker News

Summary generated by AI from the linked article. hn.today is not affiliated with Hacker News or Y Combinator.

More in Programming

The daily digest

Today's best Hacker News stories, summarized and screenshotted, one email a day.