A tale of two ports | Cockroach Labs
Blog post from Cockroach Labs
CockroachDB, initially a NoSQL distributed key-value store, has evolved into a relational SQL database, necessitating the use of two network ports due to protocol differences between HTTP and PGWire. The original setup allowed multiplexing admin UI and RPC traffic on a single port using net/rpc, but implementing PostgreSQL's wire protocol required a distinct port because PGWire operates over plain TCP. To manage this, CockroachDB employed cmux to distinguish between protocols and route traffic accordingly. While the switch to gRPC, which supports HTTP2 features, improved performance by avoiding blocking with multiplexed streams, it also introduced complications with TLS and the admin UI. The current solution involves separating the HTTP admin UI onto its own port while gRPC and PGWire share another, pending potential performance fixes from gRPC maintainers that could reinstate a single-port configuration.
| Trend | Post Mentions | Total Month Mentions | Posts | Companies | MoM |
|---|---|---|---|---|---|
| Real-time | 1 | 279 | 52 | 22 | +163% |
Use this post, company, and trend context to find content marketing opportunities, perform competitive analysis, or address product feature gaps via the Plushcap MCP server or the Plushcap API.