Wire Protocol Specs

NDB (Native Protocol)

Binary MessagePack over TCP (port 6433). Two message types:

  • Sql — SQL text as MessagePack string. Parsed by sqlparser.
  • Native opcodes — Typed messages (Get, Put, VectorSearch, etc.) that skip SQL parsing.

Both produce the same PhysicalPlan.

pgwire Extensions

NodeDB extends the PostgreSQL wire protocol with:

  • LIVE SELECT — async notification delivery via NotificationResponse
  • GRAPH commands — parsed as SQL, executed via EngineRules
  • MATCH patterns — Cypher-subset parsed inline
  • SEARCH ... USING VECTOR — vector search syntax
  • Session variables: SET nodedb.consistency = 'eventual'

HTTP API

REST endpoints on port 6480:

MethodPathDescription
POST/queryExecute SQL
POST/query/streamStream NDJSON results
GET/healthHealth check
GET/health/readyReadiness check
GET/metricsPrometheus metrics
GET/obsv/apiPromQL endpoint
GET/v1/streams/{id}/eventsSSE CDC stream
GET/v1/streams/{id}/pollLong-poll CDC
WS/wsWebSocket JSON-RPC
View page sourceLast updated on Apr 18, 2026 by Farhan Syah