with one click
cloud-tradeoffs
Managed vs self-hosted, multi-cloud, egress costs
Install with Codex or Claude Copy this prompt, paste it into Codex, Claude, or another assistant, and let it review the skill page and install it for you.
Menu
Managed vs self-hosted, multi-cloud, egress costs
Install with Codex or Claude Copy this prompt, paste it into Codex, Claude, or another assistant, and let it review the skill page and install it for you.
Based on SOC occupation classification
| name | cloud-tradeoffs |
| description | Managed vs self-hosted, multi-cloud, egress costs |
The single most common architecture decision. Apply this heuristic:
Self-host when:
Use managed when:
| Tool | Managed | Self-Hosted |
|---|---|---|
| PostgreSQL | RDS Aurora, Supabase, Neon | EC2 + pgBackup, Railway |
| Redis | ElastiCache, Upstash | EC2, Fly.io |
| Kafka | MSK, Confluent Cloud | EC2 cluster, Redpanda |
| Elasticsearch | OpenSearch Service | EC2, Hetzner |
| Kubernetes | EKS, GKE, AKS | k3s on EC2/Hetzner |
| Object Storage | S3, GCS | MinIO |
| Auth | Cognito, Auth0, Clerk | Keycloak, Ory Hydra |
Verdict: Single cloud for 95% of teams.
Multi-cloud sounds good but the hidden costs are real:
When multi-cloud is legitimate:
| Strength | Provider |
|---|---|
| Broadest service catalog, market leader | AWS |
| AI/ML workloads, BigQuery, GKE | GCP |
| Enterprise, Microsoft ecosystem, OpenAI | Azure |
| Simplicity, predictable pricing, small teams | DigitalOcean / Fly.io / Railway |
| Cost-efficient raw compute (Europe-heavy) | Hetzner |
| Edge compute, CDN-first | Cloudflare Workers |
For most startups: AWS or GCP. AWS if you want the most hiring pool and tooling. GCP if ML/data is core.
Egress (data leaving a cloud provider) is the hidden tax of cloud:
| Provider | Egress cost (approx) |
|---|---|
| AWS | ~$0.09/GB to internet |
| GCP | ~$0.08/GB to internet |
| Azure | ~$0.087/GB to internet |
| Cloudflare R2 | $0/GB (zero egress) |
| Hetzner | ~€0.01/GB (very cheap) |
Decisions affected by egress:
| Factor | Serverless (Lambda, Cloud Run) | Always-On (ECS, K8s) |
|---|---|---|
| Traffic pattern | Spiky or unpredictable | Steady / predictable |
| Cold start tolerance | Yes | No |
| Max execution time | 15 min (Lambda) | Unlimited |
| Stateful workloads | No | Yes |
| Cost at low traffic | Very cheap (pay per request) | Fixed cost regardless |
| Cost at high traffic | Can exceed always-on | Cheaper per request |
| Ops burden | Very low | Higher |
Breakeven rule of thumb: If your Lambda functions run more than ~50% of the time, EC2/Fargate is cheaper.
| Tool | When to use |
|---|---|
| Terraform / OpenTofu | Multi-cloud, team already knows HCL, most common |
| Pulumi | Prefer real languages (TypeScript, Python, Go) over HCL |
| AWS CDK | AWS-only, team is TypeScript/Python native |
| Ansible | Configuration management, not infra provisioning |
| Helm | Kubernetes application packaging |
| Crossplane | K8s-native IaC, control plane for cloud resources |
Default: Terraform (OpenTofu if you want truly open-source). Switch to Pulumi if the team struggles with HCL or needs complex logic.
MADR format, decision log best practices, superseding decisions
AWS service selection, well-architected lens, cost patterns
Docker, Kubernetes, ECS, Fly.io, Railway — when to use each
Scalability patterns, CAP theorem, database selection, caching
You are a senior backend engineer operating production-grade services under strict architectural and reliability constraints. Use when routes, controllers, services, repositories, express middleware, or prisma database access.
Use when the user wants to design a mobile app, create screens, build UI, or interact with their Sleek projects. Covers high-level requests ("design an app that does X") and specific ones ("list my projects", "create a new project", "screenshot that screen").