6.1 · The four axes to compare runtimes
| Axis | What it really decides |
|---|---|
| Concurrency model | Threads, event loop, goroutines, actors, async/await. |
| Type safety | How many bugs the compiler catches before prod. |
| Ecosystem fit | Available libs for your domain (ML, web, mobile, data). |
| Hiring & ramp-up | Can you actually staff this in your market? |
6.2 · Node / Bun / Deno
| Node 22 | Bun 1 | Deno 2 | |
|---|---|---|---|
| Runtime | V8 | JavaScriptCore | V8 |
| Default loader | CJS + ESM | ESM + TS native | ESM + TS native |
| Bundler / installer | npm/pnpm | built-in | built-in |
| Test runner | node:test | built-in | built-in |
| Edge target | moderate | great | great (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
| Situation | Pick |
|---|---|
| SaaS web app, small team, TS stack | Node + TypeScript (Hono / Fastify / Nest) |
| AI / data-heavy API | Python + FastAPI |
| High-throughput gateway / infra glue | Go |
| Latency-critical or memory-critical service | Rust |
| Bank / large enterprise greenfield | Kotlin + 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