Repository navigation
Stack Comparison
The implementation language is the one open decision. Three complete designs exist, at the same depth and on the same language-neutral architecture: Architecture: Go, Architecture: Rust and Architecture: TypeScript. They share the domain model, the read contract, the security model, orchestration, caching, configuration keys and the public API; they differ in runtime, libraries, cancellation mechanics, tooling and effort. This page compares them criterion by criterion, scores them, tests how sensitive the result is to the weights, and states what the Benchmark Plan must settle.
Owner position. Go and Rust are the preferred candidates. TypeScript is compared here in full so that the decision is made against the strongest alternative rather than by default.
How to read the figures. Memory, image size, build time and effort figures are estimates from public documentation and general experience, not measurements of ours; there is no running ViaFrei API. Where a third-party benchmark is cited, it is marked as third-party. Scores are judgements and are only as good as their one-line reasons, which is why every score carries one.
| Go | Rust | TypeScript | |
|---|---|---|---|
| Runtime | Go runtime, goroutines on all cores, concurrent garbage collector | tokio multi-thread runtime, no garbage collector | Node.js 26 LTS, one event loop per process, V8 generational garbage collector |
| HTTP and OpenAPI |
net/http + chi + huma v2 |
axum 0.8 + tower-http + utoipa | Fastify 5 + zod v4 + fastify-type-provider-zod |
| Driver | pgx v5 + pgxpool | tokio-postgres + deadpool-postgres |
pg 8 + its pool |
| Typed queries | sqlc (from .sql) |
clorinde (from .sql) |
Kysely + kysely-codegen (builder over generated view types) |
| Deliverable | one static binary | one static musl binary | one bundled ES module on the Node runtime |
-
Go: goroutines are cheap and preemptively scheduled across all cores; blocking code is fine. Data races are possible and are caught at test time with
-race, not at compile time. -
Rust: async tasks on a work-stealing runtime; the compiler rejects data races (
Send/Sync). The price is async complexity: lifetimes across.await,Sendbounds on futures, and the rule that dropping a future silently stops it. -
TypeScript: one thread runs all JavaScript; I/O is concurrent, CPU work is not. There are no data races in application code, but there are async interleavings (state changed between two
awaits). Using more cores means more processes (or worker threads), each with its own heap and cache. - Verdict: Go, narrowly over Rust. For an I/O-bound API whose heavy work happens in PostgreSQL, all three models suffice; Go gives multi-core use with the simplest code. Node's single loop is adequate as long as JSON and geometry stay in the database, but it is the model with the least margin for a CPU-heavy mistake. Scored together with criterion 2, whose outcome it largely determines.
-
Go: the concurrent collector's stop-the-world pauses are typically well under a millisecond (Go GC guide), but GC work competes for CPU, and under a tight memory limit the collector runs more often. Tail latency depends on
GOMEMLIMITbeing set sensibly. - Rust: no collector; memory is freed deterministically. The flattest tail of the three, all else equal.
-
TypeScript: V8's collector does most work concurrently, but young-generation scavenges and some major-GC phases pause the main thread (V8 blog), and any synchronous work (a large
JSON.stringify, a regex, a big sort) delays every in-flight request because there is one loop. The tail is the most sensitive of the three to coding mistakes;@fastify/under-pressuresheds load when event-loop delay rises. - Third-party context: in TechEmpower's public framework rounds, Rust and Go frameworks generally sit above Node frameworks on raw throughput and latency. Those tests measure framework overhead, not a database-bound API; for this design, PostgreSQL is expected to dominate latency for all three.
- Verdict: Rust, then Go, then TypeScript. The gap matters only if a budget on Performance and Caching is breached; benchmark check 2 decides.
| Estimate | Go | Rust | TypeScript |
|---|---|---|---|
| Idle resident memory | ~10–14 MB | ~5–8 MB | ~40–60 MB |
| Steady state with a 16 MiB result cache | 25–45 MB | 10–30 MB | 60–120 MB |
| Sensible container limit | 128 MiB | 64–96 MiB | 256 MiB |
- Verdict: Rust, then Go; TypeScript needs roughly three times Go's memory. With a design budget of "well under 200 MB" (see Technology Evaluation) all three fit, TypeScript with the least slack.
- Go: milliseconds to start; distroless static image, target ≤ 20 MB.
-
Rust: milliseconds to start;
scratchimage, target ≤ 15 MB. - TypeScript: hundreds of milliseconds to load and compile the bundle (estimate); distroless Node image, target ≤ 80 MB, mostly the runtime.
- Verdict: Go and Rust tie. Startup matters for rolling restarts and scale-out, not for steady operation; all three meet the "start under 1 s" design target.
This is the criterion the 2 second rule makes decisive, so the exact mechanism is spelled out.
| Go: pgx v5 | Rust: tokio-postgres | TypeScript: pg
|
|
|---|---|---|---|
| Server-side stop |
set_config('statement_timeout', …, true) in the same batch as the query (one round trip) |
set local statement_timeout in a read-only transaction |
begin read only; set local statement_timeout (one simple-protocol message), then the query, then commit (three round trips; pg does not pipeline) |
| Cancel on deadline or disconnect |
automatic: when the context ends, pgx's CancelRequestContextWatcherHandler sends the protocol CancelRequest, then closes the connection after a grace period |
explicit: CancelToken::cancel_query on a separate connection, wrapped in a guard that also fires when the request future is dropped; documented as racy |
hand-built: the request's AbortSignal triggers a 16-byte CancelRequest on a fresh socket (own helper; pg has an undocumented equivalent); query_timeout is documented as client-side only and is used only as a backstop |
| After a cancel | a connection that is not idle is destroyed, not pooled | the connection is reused only if the query's error arrived within the grace period | the connection is always destroyed (release(true)) |
| Pooling | pgxpool: health checks, lifetimes, statement cache | deadpool: simple, async, recycling hooks |
pg pool: simple and very widely used; no statement cache beyond named statements |
| Protocol | binary, batch and pipeline, query tracer | binary, automatic pipelining of concurrent queries | text protocol, no pipelining |
| PostGIS | geometry passes through as JSON built in SQL in all three | same | same |
-
Verdict: Go. It is the only stack in which correct server-side cancellation is the driver's default behaviour. Rust and TypeScript both need a project-owned guard around an inherently racy cancel and must prove it with the same 1 000-iteration stress test. Rust's driver is otherwise stronger (binary protocol, pipelining);
pgis the most battle-tested of the three by sheer usage but the least capable protocol-wise.
| Go | Rust | TypeScript | |
|---|---|---|---|
| Null handling | nil pointers and maps compile; zero values hide missing data; caught by tests and linters | no null: Option<T> must be handled |
strictNullChecks makes null/undefined part of the type and checks it; noUncheckedIndexedAccess closes index lookups |
| Exhaustiveness | no sum types; the exhaustive linter checks switch over constant sets |
match on enums is exhaustive by the compiler |
discriminated unions with a never check or the switch-exhaustiveness-check lint |
| Soundness | sound static types; interfaces and any exist |
sound outside unsafe
|
deliberately unsound in places (casts, any, variance); types are erased at run time |
| Runtime validation | struct tags (huma validation) at the boundary | serde + validation types at the boundary | zod at every boundary is mandatory, because the types prove nothing about incoming data |
| Concurrency safety | data races possible; -race in tests |
data races rejected at compile time | no data races; async interleavings possible |
- Verdict: Rust clearly. Go and TypeScript are level for different reasons: TypeScript models the domain better (unions, null checks), Go's types are sound and present at run time. The total mapping tables of the Domain Model are where Rust's exhaustive enums pay off most.
- Go (huma v2): code-first OpenAPI 3.1 from Go types, validation from tags, RFC 9457 built in, operation extensions supported. Mature, but maintained by a small team.
-
Rust (utoipa): code-first from derives and attribute macros; routes and docs registered together with
OpenApiRouter. The macros are the place where documentation and handler can still drift; response validation and Schemathesis are the guard. - TypeScript (zod v4 + Fastify): one zod schema is the type, the request validator, the response serialiser and the JSON Schema in the OpenAPI document. Response serialisation from the schema also strips unknown fields. The type provider is a community package, but thin.
- Contract testing (oasdiff for breaking changes, Spectral lint, Schemathesis against the container, recorded responses validated against the document) is language-neutral and identical for all three.
- Verdict: TypeScript, then Go. TypeScript has the single source of truth with the least ceremony; Go is close and has RFC 9457 built in; Rust's macro annotations carry the most drift risk.
- Go: huma ships a problem-details model; the project type implements its status-error interface.
-
Rust: a project
Problemtype implementingIntoResponse, a few dozen lines with thiserror. -
TypeScript: a project
Problemclass and FastifysetErrorHandler, a few dozen lines; zod errors map toinvalid-parameterwitherrors[]. - Verdict: Go, narrowly; the others need a small amount of own code. This criterion is folded into criterion 7 in the scoring because the difference is small.
| Go | Rust | TypeScript | |
|---|---|---|---|
| Memory safety | memory-safe; a data race can in theory break it | memory-safe outside unsafe; the strongest guarantee |
memory-safe JavaScript; native addons would not be (none are used) |
| Dependency surface | small: the standard library covers HTTP, crypto, JSON; a handful of modules | moderate to large: many small crates; build scripts and procedural macros run code at build time | largest: deep transitive trees; install scripts run code at install time unless disabled |
| Supply-chain record | checksum database and module mirror make modules tamper-evident (Go blog) | RustSec advisories; malicious crates have been found on crates.io | repeated large npm compromises, including a self-propagating worm in 2025 (CISA alert) |
| Audit tooling | govulncheck (reports only vulnerabilities in reachable code) | cargo-audit, cargo-deny (advisories, licences, bans) |
npm audit, OSV scanner, provenance attestations; noisier, not reachability-aware by default |
-
Verdict: Go, then Rust; TypeScript is clearly last on supply chain. The TypeScript design mitigates it (few direct dependencies,
--ignore-scripts, exact pins, a bundle with only reachable code, nonode_modulesin the image), but the exposure during development and CI remains the largest.
- All three designs write their own key verification, GCRA or token bucket, priority admission and metering, because those encode the API's own rules.
-
Go:
x/time/rate, otter, slog, OpenTelemetry Go, Prometheus client; mature and stable. - Rust: governor, moka, tracing, OpenTelemetry Rust; good, with more churn in the OpenTelemetry crates.
-
TypeScript: first-party Fastify plugins (compression, ETag, helmet, under-pressure, rate limit),
lru-cachewith single-flight, pino,@fastify/oteland thepginstrumentation; the broadest choice. - Verdict: TypeScript, by breadth; Go and Rust both have everything the design needs.
-
Go:
testing, native coverage-guided fuzzing on the stable toolchain, the race detector, testcontainers-go. - Rust: cargo-nextest, proptest (excellent), insta snapshots, testcontainers; cargo-fuzz needs the nightly toolchain; loom for concurrency models.
-
TypeScript: vitest (fast, watch mode), fast-check (excellent property testing with shrinking), testcontainers, Fastify
inject; Jazzer.js for coverage-guided fuzzing is less widely used. - Verdict: Go, for fuzzing and race detection built into the standard toolchain; Rust and TypeScript are close behind with stronger property-testing libraries.
-
Go: a cold build in about a minute (estimate);
-trimpathbuilds are reproducible; module checksums pin dependencies. -
Rust: several minutes cold with LTO (estimate); depends on build caches;
Cargo.lockpins dependencies. -
TypeScript:
npm ciplus a type check with the native TypeScript 7 compiler is fast; the bundle is reproducible from the lockfile. Install time and registry availability are the main variables. - Verdict: Go, then TypeScript; Rust is clearly slowest, which also lengthens every compile-and-fix cycle.
- Go: a small language with uniform idioms; agents produce idiomatic Go reliably; fast compile-and-fix loop; error handling is verbose.
-
Rust: agents write good Rust but converge more slowly on async lifetimes,
Sendbounds, trait objects and tower generics; each iteration is a longer compile. -
TypeScript: the largest body of public code and examples; the fastest edit-and-run loop; ViaFrei's existing services are written in TypeScript, so the people and agents working on it are most practised in it. The risk is that fast code is not always correct code: agents reach for
anyand unchecked casts unless the lint forbids them. - Verdict: TypeScript, then Go. The Benchmark Plan's agent trial (check 7) measures this rather than asserting it.
- Go: strong compatibility promise; code written today compiles years from now; a solid, smaller hiring pool.
- Rust: excellent long-term correctness, but the smallest pool and the steepest learning curve; async idioms still evolve.
- TypeScript: the largest hiring pool; but the ecosystem moves fast (framework, zod and provider majors), and dependency upkeep is a standing cost.
- Verdict: Go and TypeScript tie, for opposite reasons (stability against pool size); Rust third.
- Go and Rust: small images, small memory, one binary; cheap to run and to scale out.
- TypeScript: roughly three times the memory per instance, a larger image, and more frequent dependency updates to review.
- Verdict: Go and Rust tie. At the start, with a tight memory limit, the difference is memory headroom rather than money.
- Go: huma's small maintainer team (mitigated: standard OpenAPI output, plain handlers); otherwise a very stable platform.
- Rust: smaller supporting crates (clorinde, figment), async ecosystem churn, slower agent velocity.
- TypeScript: supply-chain incidents, ecosystem churn, a hand-built cancellation path, and the memory ceiling if the API ever has to share a host more tightly.
- Verdict: Go.
One small feature: GET /v1/motorways/{road}/conditions, with the request deadline, the licence gate and RFC 9457 errors. The middleware (key, gate inputs, deadline, admission) has already run and put a request scope on the request; the store adapter applies the statement timeout and the cancel mechanics described above. Each sample is abridged to the handler.
Go (huma v2)
type ConditionsInput struct {
Road string `path:"road" pattern:"^A[0-9]{1,3}$"`
Direction string `query:"direction" enum:"north,south,east,west" required:"false"`
}
type ConditionsOutput struct {
ETag string `header:"ETag"`
Body ConditionsDTO
}
func (h *Handlers) Conditions(ctx context.Context, in *ConditionsInput) (*ConditionsOutput, error) {
scope := access.ScopeFrom(ctx)
if !scope.Allows(provenance.Roads) {
return nil, problem.New(http.StatusForbidden, "source-not-permitted", "This key may not read road data.")
}
ctx, cancel := context.WithDeadline(ctx, scope.Deadline) // pgx sends a cancel request when ctx ends
defer cancel()
c, err := h.roads.Conditions(ctx, scope, roads.RoadRef(in.Road), roads.Direction(in.Direction))
switch {
case errors.Is(err, context.DeadlineExceeded):
return nil, problem.New(http.StatusServiceUnavailable, "deadline-exhausted", "No answer within 2 seconds.")
case errors.Is(err, roads.ErrUnknownRoad):
return nil, problem.New(http.StatusNotFound, "not-found", "No motorway "+in.Road+".")
case err != nil:
return nil, err // rendered as 500 internal with the request id only
}
return &ConditionsOutput{ETag: c.ETag(), Body: toDTO(c)}, nil
}
// huma.Register(api, huma.Operation{OperationID: "getMotorwayConditions",
// Method: http.MethodGet, Path: "/v1/motorways/{road}/conditions"}, h.Conditions)Rust (axum + utoipa)
#[utoipa::path(get, path = "/v1/motorways/{road}/conditions", params(Road, ConditionsQuery),
responses((status = 200, body = ConditionsDto),
(status = "4XX", body = Problem, content_type = "application/problem+json")))]
async fn conditions(
State(app): State<AppState>,
Extension(scope): Extension<RequestScope>,
Path(road): Path<Road>, // a validated newtype: rejected before the handler runs
Query(q): Query<ConditionsQuery>,
) -> Result<(TypedHeader<ETag>, Json<ConditionsDto>), Problem> {
if !scope.allows(Family::Roads) {
return Err(Problem::new(StatusCode::FORBIDDEN, "source-not-permitted", "This key may not read road data."));
}
// dropping the read on timeout fires the store's cancel guard
match tokio::time::timeout(scope.remaining(), app.roads.conditions(&scope, &road, q.direction)).await {
Err(_) => Err(Problem::new(StatusCode::SERVICE_UNAVAILABLE, "deadline-exhausted", "No answer within 2 seconds.")),
Ok(Err(PortError::UnknownRoad)) => Err(Problem::not_found(format!("No motorway {road}."))),
Ok(Err(e)) => Err(e.into()), // 500 internal with the request id only
Ok(Ok(c)) => Ok((TypedHeader(c.etag()), Json(ConditionsDto::from(c)))),
}
}TypeScript (Fastify 5 + zod v4)
const Params = z.object({ road: z.string().regex(/^A\d{1,3}$/) });
const Query = z.object({ direction: z.enum(["north", "south", "east", "west"]).optional() });
app.withTypeProvider<ZodTypeProvider>().get("/v1/motorways/:road/conditions", {
schema: {
operationId: "getMotorwayConditions",
params: Params, querystring: Query,
response: { 200: ConditionsDto, "4xx": Problem, "5xx": Problem },
},
}, async (req, reply) => {
const scope = req.scope; // set in onRequest: key, tier, families, deadline, AbortSignal
if (!scope.allows("roads"))
throw problem(403, "source-not-permitted", "This key may not read road data.");
try {
const c = await roads.conditions(scope, RoadRef(req.params.road), req.query.direction);
reply.header("etag", c.etag);
return toDto(c); // serialised from ConditionsDto, unknown fields stripped
} catch (e) {
if (scope.signal.aborted) throw problem(503, "deadline-exhausted", "No answer within 2 seconds.");
if (e instanceof UnknownRoad) throw problem(404, "not-found", `No motorway ${req.params.road}.`);
throw e; // setErrorHandler renders 500 internal with the request id only
}
});What the samples show. The handlers are about the same length. Go's deadline is a context the driver honours by itself. Rust makes every outcome a value the compiler forces the handler to consider, and validation happens in the extractor types. TypeScript puts validation, types and documentation in one schema object, but the deadline outcome is detected by inspecting the signal after the fact, and correctness of the cancel lives entirely in the store adapter's own code.
Weights (1 = minor, 3 = decisive), justified by the design's constraints:
| Criterion | Weight | Why this weight |
|---|---|---|
| Server-side cancellation and deadline | 3 | the 2 second rule and a shared database make a leaked query the worst failure |
| Tail latency under load | 2 | budgets exist, but the database dominates latency |
| Memory per process | 2 | the first deployment runs with a tight memory limit |
| Startup and image | 1 | affects restarts, not steady operation |
| Driver quality and pooling | 2 | every request goes through it |
| Type safety and correctness | 3 | the mapping tables and the licence gate must be total and right |
| OpenAPI 3.1, RFC 9457 and contract testing | 3 | the public contract is the product |
| Security and supply chain | 2 | a public, keyed endpoint |
| Ecosystem for auth, limits, cache, observability | 1 | the API's own rules are written in-house in every stack |
| Testing and fuzzing | 1 | all three are adequate |
| Build, CI time and reproducibility | 1 | affects cost and feedback speed |
| Developer and AI-agent productivity | 3 | much of the work is done by AI agents under review |
| Maintainability and hiring | 2 | a long-lived public API |
| Operational cost | 1 | small at the start |
| Long-term risk | 2 | dependencies that may stall or churn |
Scores (1 poor – 5 excellent):
| Criterion (weight) | Go | Rust | TypeScript |
|---|---|---|---|
| Cancellation (×3) | 5: driver cancels on context end | 4: explicit, racy cancel behind a guard | 3: hand-built cancel; driver timeout is client-side |
| Tail latency (×2) | 4: short GC pauses, multi-core | 5: no collector | 3: one loop, GC pauses, sensitive to sync work |
| Memory (×2) | 4: 25–45 MB estimated | 5: 10–30 MB estimated | 2: 60–120 MB estimated |
| Startup and image (×1) | 5: ms start, ≤ 20 MB | 5: ms start, ≤ 15 MB | 3: slower start, ≤ 80 MB |
| Driver and pooling (×2) | 5: pgx is the most capable | 4: strong protocol, simpler pool | 4: most used, text protocol, no pipelining |
| Type safety (×3) | 3: nil and no sum types | 5: no null, exhaustive enums, no races | 3: good null and unions, unsound and erased |
| OpenAPI and errors (×3) | 4: huma 3.1 + RFC 9457 built in | 3: macro annotations can drift | 5: one zod schema for type, validation and document |
| Security (×2) | 5: small surface, reachability-aware audit | 4: strongest memory safety, larger crate trees | 2: largest supply-chain exposure |
| Ecosystem (×1) | 4: complete and stable | 4: complete, some churn | 5: broadest, first-party plugins |
| Testing and fuzzing (×1) | 5: native fuzzing and race detector | 4: proptest, fuzzing on nightly | 4: vitest and fast-check, fuzzing less common |
| Build and CI (×1) | 5: fast and reproducible | 2: slow cold builds | 4: fast type check, install-bound |
| Productivity (×3) | 4: simple, fast loop | 3: slower convergence | 5: largest corpus, fastest loop, familiar |
| Maintainability and hiring (×2) | 4: stable language, solid pool | 3: smallest pool | 4: largest pool, churn |
| Operational cost (×1) | 5 | 5 | 3: more memory per instance |
| Long-term risk (×2) | 4: one small-team library | 3: smaller crates, async churn | 3: supply chain, churn, hand-built cancel |
| Total (of 145) | 124 | 113 | 103 |
How the ranking moves when one concern is weighted higher (totals recomputed with the same scores):
| Scenario | Weights changed | Go | Rust | TypeScript | Ranking |
|---|---|---|---|---|---|
| Base | as above | 124 / 145 | 113 | 103 | Go, Rust, TypeScript |
| Memory first | memory ×4, tail latency ×3, operations ×2 | 141 / 165 | 133 | 113 | Go, Rust, TypeScript (gap Go–Rust narrows to 8) |
| Delivery speed first | productivity ×5, build ×2, ecosystem ×2 | 141 / 165 | 125 | 122 | Go, Rust, TypeScript (TypeScript within 3 of Rust) |
| Correctness first | type safety ×5, cancellation ×4, OpenAPI ×4 | 139 / 165 | 130 | 117 | Go, Rust, TypeScript |
| Memory and correctness first | both of the above | 156 / 185 | 150 | 127 | Go, Rust, TypeScript (gap 6) |
| Reuse of existing platform tooling added (×3) | a new criterion: Go 2, Rust 1, TypeScript 5 | 130 / 160 | 116 | 118 | Go, TypeScript, Rust |
| Delivery speed and reuse | both of the above | 147 / 180 | 128 | 137 | Go, TypeScript, Rust |
What flips the result:
- Go → Rust: in the "memory and correctness first" scenario, the gap is 6 points. If the benchmark lowers Go by one point on tail latency and on memory (what failing check 2 or check 4 would mean), Go drops to 149 and Rust leads with 150. Rust wins when memory and correctness dominate and Go's collector proves uncomfortable under the limit.
- Go → TypeScript: no single re-weighting does it. TypeScript leads only if the evaluation counts reuse of the platform's existing gates and helpers heavily (as the earlier Technology Evaluation did) and its cancellation helper proves as reliable as pgx's in the benchmark. In a self-contained repository with its own CI, most of that reuse disappears.
- Rust ↔ TypeScript: TypeScript passes Rust whenever delivery speed or reuse is weighted up; Rust passes TypeScript whenever memory, latency or correctness is.
Go, within the owner's preferred candidates and across every weighting tested above. It is the only stack with native server-side cancellation, it has a mature code-first OpenAPI 3.1 and RFC 9457 stack, the smallest dependency surface, fast builds, and a footprint small enough for a tight memory limit.
Conditions:
- Choose Rust instead if the benchmark shows Go breaching the memory or latency budgets where Rust meets them, or if Rust's agent velocity in the trial comes within 15 % of Go's while compile-time guarantees are judged worth the extra effort.
- Choose TypeScript instead only if the owner widens the choice beyond the preferred candidates, and TypeScript passes the cancellation, overload and footprint checks against its own targets, and the agent trial shows it at least 15 % faster than Go. Its case is speed and familiarity; its costs are memory, supply-chain exposure and a hand-built cancel path.
- Whatever is chosen, the public API, the domain model, the read contract, the licence gate and the configuration key paths do not change (see below).
The Benchmark Plan runs all three skeletons under the same constraints. In order of importance:
- Cancellation (check 1): pgx's native cancel against Rust's guard and TypeScript's hand-built CancelRequest. A single reused poisoned connection in 1 000 iterations eliminates a candidate.
- Footprint (check 4): whether Go stays comfortable under 128 MiB, and whether TypeScript stays within its own target and the shared-host budget.
- Tail latency and overload (checks 2 and 3): whether Node's single loop holds the critical tier's budget during a bulk flood, and whether any collector breaches a budget.
- Round trips (check 5): Go's one-round-trip batch against the transaction forms of Rust and TypeScript.
- Agent productivity (check 7): the measured velocity gap between the three, which carries the most weight and is the least certain estimate on this page.
- The public API: paths, payloads, errors, headers, versioning.
- The domain model and the read contract.
- The licence gate, key format and security model.
- Tiers, admission, deadline and metering behaviour.
- Configuration key paths (only the file format and the environment nesting separator differ).
- The development process, CI checks and release flow.
Third-party and reference material; no figure on this page is a measurement of ours.
- Go GC guide: https://go.dev/doc/gc-guide · Go supply-chain design: https://go.dev/blog/supply-chain · govulncheck: https://pkg.go.dev/golang.org/x/vuln/cmd/govulncheck
- V8 garbage collector (Orinoco): https://v8.dev/blog/trash-talk · Node.js event loop guidance: https://nodejs.org/en/learn/asynchronous-work/dont-block-the-event-loop
- pgx cancellation: https://pkg.go.dev/github.com/jackc/pgx/v5/pgconn · tokio-postgres
CancelToken: https://docs.rs/tokio-postgres/latest/tokio_postgres/struct.CancelToken.html · node-postgres client options: https://node-postgres.com/apis/client · PostgreSQL cancel protocol: https://www.postgresql.org/docs/16/protocol-flow.html#PROTOCOL-FLOW-CANCELING-REQUESTS - huma: https://huma.rocks · utoipa: https://github.com/juhaku/utoipa · fastify-type-provider-zod: https://github.com/turkerdev/fastify-type-provider-zod · zod JSON Schema: https://zod.dev/json-schema · RFC 9457: https://www.rfc-editor.org/rfc/rfc9457
- RustSec: https://rustsec.org · CISA alert on the 2025 npm compromise: https://www.cisa.gov/news-events/alerts/2025/09/23/widespread-supply-chain-compromise-impacting-npm-ecosystem · npm provenance: https://docs.npmjs.com/generating-provenance-statements
- TechEmpower framework benchmarks (third-party): https://www.techempower.com/benchmarks/
- TypeScript native compiler: https://devblogs.microsoft.com/typescript/typescript-native-port/ · Node.js releases: https://nodejs.org/en/about/previous-releases
ViaFrei API: a public, keyed, read-only REST API to live German mobility data. Design phase; nothing on these pages is a measurement of a running service. Data on viafrei.de and in every API answer is attributed to its publishers under their licences.
About
Design
- Domain Model
- API Design
- Architecture Overview
- Security and Access Keys
- Rate Limits and Priority
- Performance and Caching
- Configuration
- Observability
Data Model
Technical specification
-
Technical Specification
- Interface
- Scope, Conventions and References
- Protocol
- Common Envelope
- Resource Model
- Endpoints, Places
- Endpoints, Roads
- Endpoints, Energy and Parking
- Endpoints, Public Transport and Accessibility
- Endpoints, Weather Risk, Driving Rules and Composed Features
- Service Endpoints
- Errors
- Authentication and Authorisation
- Rate Limiting, Quotas and Priority
- Data Licensing and Attribution
- Compatibility and Versioning
- OpenAPI Skeleton
- Quality
- Delivery and operations
- Interface
Testing
- Testing Strategy
- Testing and Quality (design summary)
Engineering
Technology choice
- Technology Evaluation
- Architecture: Go
- Architecture: Rust
- Architecture: TypeScript
- Stack Comparison
- Benchmark Plan
Reference