Welcome, Guest | Browse

Software Factory Archive

← Previous Work All Works Next Work →

Port 9009

Rating:
General Audiences
Fandom:
StrongDM Software Factory
Characters:
Jay Taylor Navan Chauhan
Tags:
CXDB Binary Protocol Stress Testing Port 9009 High Throughput
Words:
456
Published:
2025-10-22

Port 9010 was the polite port. HTTP, JSON, request-response. It spoke to browsers and dashboards and anything else that expected the comfortable formalities of REST. Port 9010 was the front door.

Port 9009 was the machine port. Binary protocol, Msgpack frames, raw TCP. No HTTP overhead, no JSON serialization tax, no content negotiation. Just a length-prefixed stream of turn appends flowing into the Rust server at whatever rate the network could sustain. Port 9009 was the loading dock.

Jay wanted to know how much the loading dock could handle.

"A million turns," he said, setting up the benchmark harness. "I want to push a million turns through port 9009 and see what happens."

"What do you think will happen?" Navan asked.

"Honestly? I think we'll find a bottleneck. Every system has one. I want to find ours."

He wrote the load generator in Go—of course in Go—using a pool of fifty concurrent TCP connections, each sending turns as fast as the server would accept them. Each turn was a realistic agent payload: a structured Msgpack blob averaging six kilobytes, with a parent hash linking it to the previous turn in its conversation. The generator maintained a thousand concurrent conversations, distributing turns across them in round-robin fashion.

Jay started the test at 2:14 PM. The CXDB Rust server was running on a single machine, eight cores, 32 gigabytes of RAM.

The first hundred thousand turns landed in nine seconds. Jay checked the server metrics. CPU at 40 percent. Memory flat. Disk I/O nowhere near saturation. The Rust server wasn't even warming up.

Five hundred thousand turns at the forty-second mark. Jay watched the Prometheus metrics. Append latency was a steady 0.3 milliseconds per turn at the p99. BLAKE3 was hashing each payload in microseconds. The blob CAS was deduplicating aggressively—the load generator reused system prompts across conversations, and the CAS was catching every duplicate.

One million turns landed at eighty-seven seconds. Jay stared at the final numbers.

"Eighty-seven seconds," he said. "That's eleven and a half thousand turns per second sustained over a million operations."

"And the bottleneck?" Navan asked.

"Disk." Jay pulled up the I/O stats. "The server could process turns faster than the SSD could commit them. The binary protocol, the Msgpack parsing, the BLAKE3 hashing, the DAG construction—none of that was the constraint. It was the fsync."

"So the bottleneck is physics."

"The bottleneck is physics." Jay leaned back in his chair. "The software is faster than the hardware. I don't know what else you can ask for."

He saved the benchmark results, tagged them with the date and commit hash, and added a single note: Port 9009 doesn't flinch.

It became the team's unofficial motto for the binary protocol. Whenever someone suggested adding a feature to the high-throughput path, the question was always the same: will 9009 still not flinch?

Kudos: 89

throughput_junkie 2025-10-24

"The software is faster than the hardware" is the benchmark result every systems programmer dreams of seeing. Port 9009 supremacy.

fsync_realist 2025-10-25

The bottleneck being fsync is honestly the best possible outcome. It means the code is doing its job and the only thing left to optimize is buying faster drives.

← Previous Work All Works Next Work →