← Friday, October 2, 2026ArchitectureDeep dive

Neki avoids decoding PostgreSQL responses the router does not need

planetscale.com by Dirkjan Bussink 15 min read Editor score 8/10

Neki’s router lazily walks PostgreSQL protocol messages, constructing rows or decoding columns only when needed. The composable approach offers a concrete way to reduce overhead in a query-routing layer.

What
Neki adds a router between PostgreSQL clients and PostgreSQL servers to route queries to shards and make many servers look like one.
How
It avoids eagerly decoding response data: walking messages need not construct rows, and finding rows need not decode every column.
Why it matters
Skipping unnecessary decoding can reduce work on the router, where each query adds a network hop and processing overhead.
query routes PostgreSQLclient Neki PostgreSQL
Neki routes client queries between PostgreSQL clients and servers. Sketched from the article's own text.

Discussion

Discussion is not switched on yet. Use Note above to keep your own thoughts on this story.

Headline, summary, brief and diagram are written by a model from the source's own text; the link, byline and numbers come from the source. Read the original before relying on a claim.

Your note

Private to you. Stored in this browser, and synced to your account when you are signed in.