2.1 · The seven layers of a modern stack
2.2 · Client layer
| Choice | When |
|---|---|
| Next.js (React) | Default for most product web apps. App Router, RSC, edge runtime. |
| Astro | Content-heavy sites; islands architecture; ship near-zero JS. |
| SvelteKit | Smaller bundle, simpler mental model. Strong DX. |
| Vue / Nuxt | Big in EU and Asia; great template ergonomics. |
| SolidJS / Qwik | Best-in-class reactivity / resumability; smaller community. |
| React Native + Expo | Mobile when you have a React team. |
| Flutter | Mobile + desktop with one codebase; rich UI control. |
| Tauri / Electron | Cross-platform desktop. Tauri = small + fast (Rust). |
2.3 · Edge & CDN
| Choice | Notes |
|---|---|
| Cloudflare | CDN + Workers + R2 + D1 + Durable Objects; the best-rounded edge platform. |
| Vercel Edge / AWS Lambda@Edge | Edge runtimes tied to a deploy platform. |
| Fastly | Programmable edge (VCL → Compute@Edge); great for media. |
| Bunny | Cheap pull CDN; good for static assets. |
2.4 · API / Gateway
| Choice | Notes |
|---|---|
| Kong / Envoy / NGINX | Battle-tested ingress + policy. |
| AWS API Gateway / GCP Endpoints / Azure APIM | Managed, deep cloud integration. |
| Hasura / PostGraphile | Instant GraphQL on top of Postgres. |
| Tyk / Apigee | Enterprise API management with portals + billing. |
2.5 · Application runtime
| Runtime | Sweet spot |
|---|---|
| Node 22 / Bun 1 / Deno 2 | Web BFFs, real-time, JS/TS unified stacks. |
| Python 3.12 / FastAPI | Data, ML, AI, glue services. |
| Go | High-throughput services, infra tooling. |
| Rust (Axum / Actix / Loco) | Safety-critical, perf-critical, embedded edge runtimes. |
| Java / Spring · Kotlin | Enterprise, financial, JVM ecosystems. |
| .NET 9 | Microsoft shops; excellent perf with AOT. |
| Elixir / Phoenix | Massive concurrency (LiveView, Channels). |
2.6 · Data layer
| Family | Picks |
|---|---|
| OLTP relational | Postgres (Neon, Supabase, RDS, Aurora), MySQL (PlanetScale). |
| KV / cache | Redis, Valkey, Dragonfly, Cloudflare KV. |
| Document | MongoDB, CouchDB, Firebase Firestore. |
| Wide-column | Cassandra, ScyllaDB. |
| OLAP / analytics | ClickHouse, DuckDB, Snowflake, BigQuery, Databricks. |
| Search | OpenSearch, Elasticsearch, Typesense, Meilisearch. |
| Vector | pgvector, Qdrant, Weaviate, Pinecone, Milvus. |
| Time-series | TimescaleDB, InfluxDB, VictoriaMetrics. |
| Graph | Neo4j, Memgraph, Apache AGE. |
| Object | S3, R2, GCS, Azure Blob, MinIO. |
2.7 · Async & messaging
| Choice | Notes |
|---|---|
| Kafka (or Redpanda) | High-throughput event streaming, log-style. |
| NATS / JetStream | Lightweight pub-sub + persistent streams; very fast. |
| RabbitMQ | Classic AMQP; rich routing. |
| SQS / SNS / EventBridge / Pub/Sub | Cloud-managed queues & events. |
| Temporal / Inngest / Trigger.dev | Durable execution: long-running, retryable workflows. |
2.8 · Platform / infra
| Concern | Picks |
|---|---|
| Containers | Docker, containerd, BuildKit. |
| Orchestration | Kubernetes, Nomad. Managed: EKS / GKE / AKS. |
| IaC | Terraform, OpenTofu, Pulumi, AWS CDK. |
| GitOps | ArgoCD, Flux. |
| PaaS / "K8s-lite" | Render, Railway, Fly.io, Cloud Run, App Runner. |
| Edge platforms | Cloudflare Workers, Vercel, Deno Deploy. |
| Internal dev platforms | Backstage, Port, Cortex. |
2.9 · Cross-cutting (auth · observability · AI)
| Concern | Picks |
|---|---|
| Identity / auth | Auth0, Clerk, WorkOS, Keycloak, Ory, Cognito. |
| Secrets | HashiCorp Vault, AWS KMS / Secrets Manager, Doppler, SOPS. |
| Observability | OpenTelemetry · Datadog · Honeycomb · Grafana / Loki / Tempo · Sentry. |
| CI/CD | GitHub Actions, GitLab CI, CircleCI, Buildkite. |
| AI in dev | Copilot, Cursor, Claude Code, Cody, Continue. (Ch 16.) |
2.10 · A pragmatic default stack for a new project (2026)
SaaS web app, small team
Next.js · Vercel · Supabase (Postgres + auth + storage) · Stripe · Upstash · Sentry · GitHub Actions.
API-heavy back-office
FastAPI or Go · Postgres + Redis · NATS · Cloudflare in front · Fly.io or AWS ECS · OTel + Grafana.
Event-driven enterprise
Java/Kotlin · Kafka · Postgres + ClickHouse · Kubernetes · ArgoCD · Datadog · Vault.
AI-native product
Next.js + FastAPI · Postgres + pgvector · Redis · S3 · LangGraph + LiteLLM · LangFuse · OTel.
Conway's Law
The shape of your software ends up mirroring the shape of your org. If your team is two pizzas, do not pick
a 30-microservice architecture. Match the stack to the team you actually have.
2.11 · Self-check
Q1 · Best default for a content-heavy marketing site with near-zero JS?
Next.js with full RSC
Astro
CRA
Electron
Q2 · "Durable execution" tools (Temporal, Inngest) solve…
Caching
Long-running, retryable, stateful workflows
Vector search
SSL termination