HELM
Ch 06 · Backend Runtimes & Frameworks
Chapter 06 · Where logic lives

Backend — choose the runtime that fits the team, the load, and the future

There is no single best runtime — only correct trade-offs. This chapter is the comparison table you wish recruiters had read.

6.1 · The four axes to compare runtimes

AxisWhat it really decides
Concurrency modelThreads, event loop, goroutines, actors, async/await.
Type safetyHow many bugs the compiler catches before prod.
Ecosystem fitAvailable libs for your domain (ML, web, mobile, data).
Hiring & ramp-upCan you actually staff this in your market?

6.2 · Node / Bun / Deno

Node 22Bun 1Deno 2
RuntimeV8JavaScriptCoreV8
Default loaderCJS + ESMESM + TS nativeESM + TS native
Bundler / installernpm/pnpmbuilt-inbuilt-in
Test runnernode:testbuilt-inbuilt-in
Edge targetmoderategreatgreat (Deno Deploy)

Use when: JS/TS unified stack (Next/Nuxt), real-time (Socket.IO, BFFs), API + integration glue. Watch out: CPU-bound work; long sync calls block the loop.

6.3 · Python (FastAPI / Litestar / Django / Flask)

  • FastAPI — async, Pydantic-typed, OpenAPI out of the box. Default for new APIs.
  • Litestar — faster than FastAPI; more opinionated.
  • Django — batteries-included; admin, ORM, auth. Great for "internal app".
  • Pick Python for ML/AI integration, data processing, scripting-heavy domains.
  • Run with uv + uvicorn/granian; type-check with mypy/pyright.

6.4 · Go (net/http, Chi, Echo, Fiber)

  • Goroutines + channels = simple high-concurrency.
  • Tiny static binaries; deploy as a single file.
  • Boring on purpose; great for infra, CLIs, gateways, networked services.
  • Modules: chi, echo, fiber, connect-go; standard library is mostly enough.

6.5 · Rust (Axum, Actix, Loco, Rocket)

  • Memory-safe, zero-cost abstractions; no GC pauses.
  • Axum + Tokio + sqlx is the modern web stack.
  • Loco — Rails-style framework for Rust.
  • Use for: latency-sensitive APIs, edge runtimes (Workers), data tooling, anywhere C++ would have been.
  • Watch out: slower dev velocity; longer compile times; rarer hiring.

6.6 · JVM — Java / Kotlin / Spring

  • Spring Boot 3 / Quarkus / Micronaut + virtual threads (Project Loom) make Java very competitive again.
  • Kotlin + Coroutines + Ktor for greenfield JVM services with great DX.
  • Best for enterprise, fintech, anywhere the JVM ecosystem (Kafka clients, Hadoop, ML libs) is rich.
  • GraalVM AOT compile → tiny startup, lambda-friendly.

6.7 · .NET

  • .NET 9 with Minimal APIs is a fast, ergonomic, AOT-friendly target.
  • C# is excellent for typed business logic; F# for functional domains.
  • EF Core for the ORM; very strong tooling on Windows + Linux.

6.8 · Elixir / Erlang (Phoenix)

  • BEAM VM = millions of lightweight processes, supervisor trees, hot-code reload.
  • Phoenix LiveView gives real-time UIs without a frontend framework.
  • Sweet spot: chat, real-time dashboards, telecom-like workloads.

6.9 · A short list of pragmatic defaults

SituationPick
SaaS web app, small team, TS stackNode + TypeScript (Hono / Fastify / Nest)
AI / data-heavy APIPython + FastAPI
High-throughput gateway / infra glueGo
Latency-critical or memory-critical serviceRust
Bank / large enterprise greenfieldKotlin + Spring or Java + Spring
Real-time fan-out (chat, dashboards)Elixir / Phoenix or Node + WebSockets

6.10 · Cross-runtime patterns every backend needs

  • 12-factor — config in env, stateless processes, logs as streams.
  • Connection pooling — DB + HTTP; size with Little's Law.
  • Graceful shutdown — SIGTERM → stop accepting → drain → exit.
  • Health endpoints — liveness vs readiness vs startup.
  • Timeouts everywhere — DB, HTTP client, RPC, queue consumer.
  • Idempotency on write APIs (Stripe-style Idempotency-Key).
  • Observability hooks — OTel auto-instrumentation, structured logs (JSON).

6.11 · Self-check

Q1 · Your service must absolutely not GC-pause; sub-ms tail latency. Best fit?
Python
Node
Rust
Java