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:

All data routes are under /v1/. Probe routes (/healthz, /health/*, /metrics) are unversioned and always reachable.

MethodPathDescription
POST/v1/queryExecute SQL
POST/v1/query/streamStream NDJSON results
GET/v1/statusNode status
GET/v1/cluster/statusCluster status
POST/v1/auth/exchange-keyExchange API key for session token
POST/v1/auth/sessionCreate session
DELETE/v1/auth/sessionDelete session
POST/v1/collections/{name}/crdt/applyApply CRDT delta
GET/v1/streams/{id}/eventsSSE named-stream events
GET/v1/streams/{id}/pollLong-poll named-stream
GET/v1/cdc/{collection}SSE CDC stream
GET/v1/cdc/{collection}/pollLong-poll CDC
GET/v1/obsv/api/v1/...PromQL endpoints (Prom-spec suffix)
WS/v1/wsWebSocket JSON-RPC
GET/healthzk8s readiness (503 until startup ready)
GET/health/liveLiveness probe
GET/health/readyReadiness probe
POST/health/drainCooperative drain
GET/metricsPrometheus metrics

JSON responses carry Content-Type: application/vnd.nodedb.v1+json; charset=utf-8. Clients sending only Accept: application/vnd.nodedb.vN+json for an unsupported N get 406 Not Acceptable.

View page sourceLast updated on May 12, 2026 by Farhan Syah