Go for the platform
Status
Section titled “Status”Accepted. Reaffirmed on 2026-10-19 after a comparison of the router and the identity code in Go and Rust, and after an earlier proposal to move the platform to TypeScript was not carried out.
2026-10-19
Context
Section titled “Context”The platform’s hard parts are an I/O-bound message router, a leader-gated delivery pipeline and an identity provider. Over its life the same behaviour has been built in more than one language, which gave the project unusually direct evidence:
- The router was built and benchmarked in Go, Rust and Java at the same shape (100 queues, 100 pools of 64 workers, a trivial HTTP/2 sink) in October 2026.
- The identity code (OAuth and OIDC provider, sessions, second factors, passkeys) was reviewed side by side in Go and Rust.
- A TypeScript platform blueprint (September 2026) proposed one language for the control plane with the router kept in a compiled language.
What the router comparison showed:
| Go | Rust | Java | |
|---|---|---|---|
| Steady rate at 1 CPU | 18 to 18.6k msg/s | 29 to 31k msg/s | 21.5k msg/s (after a broker fix) |
| Peak memory at 1 CPU | 237 to 289 MB | 477 to 658 MB | 1 to 1.9 GB (heap follows the container limit) |
| Fixes needed at this shape | four | three | three |
Rust was the most efficient per CPU. Go used the least memory and scaled well to four CPUs. Every implementation needed fixes, and most failures were in libraries and design (a task per buffered message, HTTP/2 stream limits, deferral spacing), not in the language. The comparison itself states that benchmarks do not decide which code is easier to maintain, how it behaves against slow targets, or the supply-chain question.
The identity review found Go slightly ahead on features and clearly ahead on how much code a single reader must audit on the critical path (about 9 thousand lines against about 15 thousand) and on supply chain (roughly 28 non-standard-library modules in the identity closure against more than 500 crates).
Decision
Section titled “Decision”The platform stays in Go. The reasons given by the maintainer were that the code can be read and audited by the people responsible for it, the dependency graph is small, and the language is fast enough for the workload. Where Rust is faster, the margin is not what limits a deployment.
Consequences for related choices:
fcdevis not tied to Go. If the platform ever moved language,fcdevwould move with it.- A second implementation is kept honest through the OpenAPI lockfile and the wire contract (see ADR 0003), not through shared code.
- Rust remains a ready mirror of selected components rather than the plan.
- Function runtimes are a separate choice, decided on their own evidence (see ADR 0031).
Consequences
Section titled “Consequences”Good
- Fast builds, small dependency graphs and a standard library that covers HTTP, TLS, JSON and concurrency, so there are fewer third-party surfaces to track.
- Straight-line concurrency (goroutines, contexts) that a maintainer can read at 3am.
- Low and flat memory in the router, which matters when many pools and queues share a node.
- One toolchain and one binary for server and
fcdev.
Bad
- About 1.6 times less throughput per CPU than the Rust router at one core in the benchmark.
- Fewer compile-time guarantees than Rust offers for ownership and cancellation, so some correctness is carried by tests, analyzers and conventions (for example the sealed plan type in ADR 0011).
- Library behaviour must be tested above its limits regardless of language. In Go this included an HTTP/2 client setting that could deadlock above a server’s stream limit.
- The identity review found Go-side defects at the time (non-atomic refresh rotation, since made atomic, and a read-then-write TOTP replay guard). Choosing Go does not remove the need for such reviews.
Alternatives considered
Section titled “Alternatives considered”- Rust. Best raw efficiency and strong correctness tools; larger code and dependency graph, a heavier supply-chain process, and the maintainer cannot audit it as readily.
- Java. Mature diagnostics, virtual threads and a large test suite; the largest footprint and the slowest build, with several HTTP clients whose behaviour differs sharply at limits. Java is used for the application framework’s reference implementation (see ADR 0044).
- TypeScript on Deno with a compiled router. Proposed for the fastest change loop and readability by non-specialists. It was not pursued: the maintainers prefer a compiled, single-binary platform they can read, and the 2026-10-19 ruling settled on Go.